【matlab】容易忘的小语句

title

title(sprintf("%d次拟合曲线", i))
title ( ['运行时间: ',num2str(i) ] );

在subplot中加入大标题

转载自:https://zhuanlan.zhihu.com/p/500407309

subplot(2,2,1), title('First Subplot')
subplot(2,2,2), title('Second Subplot')
subplot(2,2,3), title('Third Subplot')
subplot(2,2,4), title('Fourth Subplot')

sgtitle('Subplot Grid Title') % 就是这个函数

subplot大标题

marker

绘制对数图、设置线宽、符号大小和间隔

semilogy(x ,y,'k--s', 'LineWidth', 1.2,        
			  'MarkerSize',8, 
			  'MarkerIndices',1:3:length(x));

legend

需要添加latex公式:

legend({['$\Delta f_T = $',num2str(dfT1),'MHz'],
		['$\Delta f_T = $' ,num2str(dfT2),'MHz']},
		'Interpreter','latex');

需要修改legend位置

legend('sin(x)','cos(x)','Location','North');

加噪声

ys_add_noise=awgn(ys,snr);
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值