9 lines
192 B
Matlab
9 lines
192 B
Matlab
x=-2:0.2:2;
|
|
y=x.^2;
|
|
plot(x,y)
|
|
str1 = num2str(min(x));
|
|
%数字转化为字符串
|
|
str2 = num2str(max(x));
|
|
%数字转化为字符串
|
|
out = ['Value of f from ''str1'' to ''str2'' '];
|
|
xlabel(out); |