基本思路是通过字符串拼接,如果有数字,需要通过num2str转换
clear
clc
x=1:0.01:10;
y=sin(x);
plot(x,y,'linewidth',3)
xlabel('x')
ylabel('y')
x=1;
str='study'
title(['x=',num2str(x), ', ', str])
基本思路是通过字符串拼接,如果有数字,需要通过num2str转换
clear
clc
x=1:0.01:10;
y=sin(x);
plot(x,y,'linewidth',3)
xlabel('x')
ylabel('y')
x=1;
str='study'
title(['x=',num2str(x), ', ', str])