MATLAB绘制函数图像

正在做毕设 一个matlab画函数图像问题😪

img

img


如图这两个函数画在一张图上
其中a0是大于2c/(1-c)的自变量,T1和T3是因变量,但c是一个大于0小于1的参数。
不想给c赋值的话怎么办啊(比如T1的函数图像1-c就是渐近线)谢过各位神

你看下这个例子


import numpy as np

import matplotlib.pyplot as plt

"""

This is all from the tutorial located at :

http://scipy-lectures.github.io/intro/matplotlib/matplotlib.html

"""

pl.figure(figsize=(10, 6), dpi=80)

pl.subplot(1, 1, 1)

X = np.linspace(-5, 5, 500, endpoint=True)

C = (1/X**2)-5

P = X - X - 0.1

pl.xlim(X.min() * 1.1, X.max() * 1.1)

pl.ylim(C.min() * 1.1, C.max() * 1.1)

"""

Alters the position of the axis - moves them to the centre

"""

ax = pl.gca() # gca stands for 'get current axis'

ax.spines['right'].set_color('none')

ax.spines['top'].set_color('none')

ax.xaxis.set_ticks_position('bottom')

ax.spines['bottom'].set_position(('data',0))

ax.yaxis.set_ticks_position('left')

ax.spines['left'].set_position(('data',0))

pl.plot(X, C, color="blue", linewidth=4, linestyle="-",

label="y = 4 - 1/x^2")

pl.legend(loc='upper left')

for label in ax.get_xticklabels() + ax.get_yticklabels():

label.set_fontsize(16)

label.set_bbox(dict(facecolor='white', edgecolor='None', alpha=0.65))

plt.ylim((-7,20))

plt.show()