1

我正在尝试绘制一个数据集,并希望在显示中看到一小部分绘图。问题是数据集很大,当我在整个数据集上运行算法时,图中的显着变化并不清楚(视觉上)。这就是为什么我想在整个数据集上运行算法并想在显示中查看结果图的一部分,比如从中间看 10% 的图。任何人都可以帮我如何从中间切割M-figure - 原始情节的10%?提前致谢。

4

2 回答 2

2

假设您正在绘制x.

L = length(x);
fraction = 0.1;        %#plot 10% of signal
n = round(L*fraction); %#number of samples/points to plot
offset = 0.5           %#start plotting at 50% of the signal (middle)
s = round(L*offset)    %#number of samples/points to skip before plotting

t = s:s+n-1;           %#discrete 'time' vector, so you know where you are on the plot

plot(t,x(t));          %#plot the selected signal portion
于 2011-08-09T15:25:26.857 回答
1

xlimylimzlim你想做的事?

于 2011-08-09T15:23:09.993 回答