【问题标题】:Matlab plot a threshold lineMatlab绘制阈值线
【发布时间】:2013-03-23 12:15:07
【问题描述】:

我想在我的 0.7 图表中添加一条水平阈值线。但我似乎无法让它工作。

代码

figure(1)
plot(Variance);
hold on;
plot([1 frames], threshold, 'red')

方差是要绘制的数组,帧是绘制的方差数。我试过移动holdplots,但它似乎也不起作用。

我知道这是一个简单的问题,但关于将它们添加到同一个 plot(),我在网上查看的所有内容似乎都不起作用。

谢谢

【问题讨论】:

  • 您是否尝试将第二个绘图更改为 plot([1 frames], [threshold threshold], 'red') ?
  • 做到了,我知道这将是一件我想念的简单事情。谢谢
  • @wakjah 您应该将其发布为答案,以便 OP 可以接受它并解决问题。

标签: matlab plot


【解决方案1】:

您应该将第二条绘图线更改为

plot([1 frames], [threshold threshold], 'red');

【讨论】:

    猜你喜欢
    • 2021-05-04
    • 1970-01-01
    • 1970-01-01
    • 2018-07-17
    • 2014-08-08
    • 1970-01-01
    • 1970-01-01
    • 2015-05-04
    • 1970-01-01
    相关资源
    最近更新 更多