Run function showing error on plot

4 ビュー (過去 30 日間)
Lodina Recica
Lodina Recica 2021 年 4 月 7 日
コメント済み: Rik 2021 年 4 月 7 日
I have already remamed the script to myPlot.m and removed it from path but it is still saying
workPlot
Error using plot
Vectors must be the same length.
Error in workPlot (line 10)
plot (freq, abs(fourierSpace));
  3 件のコメント
Lodina Recica
Lodina Recica 2021 年 4 月 7 日
fourierSpace = fftshift(ifft(data));
this is the line above, if it helps I can provide the entire algorithm. It is my professors and I am required to run it
Rik
Rik 2021 年 4 月 7 日
That doesn't answer my question. The error you are getting is telling you that the two variables don't have the same size. That means that one is larger than the other. The code you posted only shows the origin of one of the variables.
Can you figure out why these two variables might have different lengths? Could it have something to do with the Fourier transform being symmetrical, with one half often being discarded?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating, Deleting, and Querying Graphics Objects についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by