Files
matlab-learning/lab4/exercise4_7.m
2025-11-26 19:01:27 +08:00

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);