当前位置 : 主页 > 网络编程 > 其它编程 >

Matlab小技巧

来源:互联网 收集:自由互联 发布时间:2023-07-02
%使用函数num2str自动标注y轴x0.11:0.1:100;yx.^3;plot(x,y)str1num2str(min(y));str2num2str(max(y));out %使用函数num2str自动标注y轴 x0.11:0.1:100; yx.^3; plot(x,y) str1num2str(min(y)); str2num2str(max(y)); out[Value of y from s
%使用函数num2str自动标注y轴x0.11:0.1:100;yx.^3;plot(x,y)str1num2str(min(y));str2num2str(max(y));out

%使用函数num2str自动标注y轴

x0.11:0.1:100;

yx.^3;

plot(x,y)

str1num2str(min(y));

str2num2str(max(y));

out[Value of y from str1 to str2];

ylabel(out);

cfdb2a2b0bb3e5e7e6a1e27fa6910a63.png

%用字符串结构数组进行标注

str1(1){Center each line in the Uicontrol};

str1(2){Also check out the textwrap function};

str2(1){Each cell is a quoted string};

str2(2){You can specify how the string is alighed};

str2(3){You can Use LaTeX symbols like \pi \chi \Xi};

str2(4){\bfOr use bold \rm\itor italic font\rm};

str2(5){\fontname{courier}Or even change fonts};

plot(0:6,sin(0:6))

uicontrol(Style,text,Position,[80 80 250 65],String,str1);

text(5.75,sin(2.5),str2,HorizontalAlignment,right)

eeddf0f4b84e3d9b63daaa4ddfd3ed9e.png

上一篇:学习JDK内置纯JAVA数据库Derby
下一篇:没有了
网友评论