Why is nothing is being plotted when I run this?

4 次查看(过去 30 天)
r = randn(1000, 1);
r_DCT = dct(r);
plot(r_DCT, 'o-')
  3 个评论
Liam
Liam 2025-3-28
Do you know why it doesnt plot on MATLAB itself?
Torsten
Torsten 2025-3-28
编辑:Torsten 2025-3-28
Do you know why it doesnt plot on MATLAB itself?
I can't see how MATLAB is configured on your computer. Don't you get an error message ? Maybe you don't have the Signal Processing Toolbox licenced and/or installed which is necessary for using "dct".

请先登录,再进行评论。

回答(1 个)

Karanjot
Karanjot 2025-4-9
Hi Liam,
This is the default behaviour for MATLAB scripts or '.m' files. If you want the figure to show up in line with the code, you can consider using a MATLAB live script instead.

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

产品


版本

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by