从中间切割 matlab 图的命令

发布于 2024-11-28 13:32:42 字数 157 浏览 0 评论 0原文

我正在尝试绘制数据集,并希望在显示中看到该图的一小部分。问题是数据集很大,当我在整个数据集上运行算法时,绘图中的显着变化并不清晰(视觉上)。这就是为什么我想要在整个数据集上运行该算法,并想要在显示中查看结果图的一部分,比如中间的 10% 的图。谁能帮我把M图从中间剪掉——原来情节的10%?提前致谢。

I am trying to plot a dataset and want to see a small portion of the plot in the display. The problem is that the dataset is huge and when I am running the algorithm on the whole dataset the significant change in the plot is not clear (visually). Thats why I want to run the algorithm on the whole dataset and want to view a portion of the resulting plot in the display, say 10% of the plot from the middle. Can anyone please help me how to cut the M-figure from the middle - 10% of the original plot? Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你与昨日 2024-12-05 13:32:42

假设您正在绘制 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

Suppose you're plotting 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
泪痕残 2024-12-05 13:32:42

执行 xlimylimzlim 做你想做的事吗?

Do xlim, ylim and zlim do what you want?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文