I am plotting amplitude reconstruction of FMCW radar.
我只想翻转里面的图。但是 x 轴应该是相同的。我该怎么办呢。下面是我的绘图代码。
for i = 1:2500 %%%% dividing each row by first row.
resd(i,:) = res3(i,:)./res3(1,:);
end
f = fs/2*linspace(0,1,nfft/2+1); %%%% defining frequency axes
K = BW/Tm;
t = f/K;
deltaf = 1/max(t);
fmax = 1 / t(2)-t(1);
f1 = 0:deltaf:fmax;
% f1 = fmax:deltaf:0;
f2 = f1 + fc;
%%%%%% Amplitude reconstruction
figure(1),plot(f2,abs(resd));
[![enter image description here][1]][1]
正如在轴文档,很简单:
set(gca,'XDir','reverse')
如果你只是想翻转标签,只需flip标签:
plot(1:10,1:10)
set(gca, 'XTickLabel', flipud( get(gca, 'XTickLabel') ))
或者对于 Matlab R2014b 或更高版本更简单一些:
a = gca;
a.XTickLabel = flipud(a.XTickLabel);
但请注意,调整图形大小时标签将不再改变。所以要提前确定好尺寸。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)