MATLAB中如何显示文字呢?我想在subplot(1,2,1)中显示一幅图,在subplot(1,2,2)的位置中显示汉字

MATLAB中如何显示文字呢?我想在subplot(1,2,1)中显示一幅图,在subplot(1,2,2)的位置中显示汉字,第1张

>>clearx=1:0.1:10y=cos(5*x+2)./sin(3*x+1)plot(x,y)hold onsyms xy=cos(5*x+2)./sin(3*x+1)plot(2,subs(y,x,2),'o')gtext('点击在此处添加汉字')

运行一下你就明白了。望采纳

>>x = linspace(0,10)

>> y1 = sin(x)

>> y2 = sin(2*x)

>> y3 = sin(4*x)

>> y4 = sin(8*x)

>>  figure

>> subplot(2,2,1)

>> plot(x,y1)

>> title('Subplot 1: sin(x)')

>> xlabel('x'),ylabel('y1')

>> subplot(2,2,2)

>> plot(x,y2)

>> title('Subplot 2: sin(2x)')

>>xlabel('x'),ylabel('y2')

>> subplot(2,2,3)

>> plot(x,y3)

>> title('Subplot 3: sin(4x)')

>>xlabel('x'),ylabel('y3')

>> subplot(2,2,4)

>> plot(x,y4)

>> title('Subplot 4: sin(8x)')

>>xlabel('x'),ylabel('y4')


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/bake/11906447.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-19
下一篇 2023-05-19

发表评论

登录后才能评论

评论列表(0条)

保存