periodogram example code
4 ビュー (過去 30 日間)
古いコメントを表示
I am trying to get to grips with plotting a periodogram of a financial time series using Matlab. My first port of call was the product documentation for the periodogram on the mathworks website, http://www.mathworks.com/help/toolbox/signal/periodogram.html.
So I went and copied there example code into Matlab, below
Fs = 1000;
t = 0:1/Fs:.3;
x = cos(2*pi*t*200)+0.1*randn(size(t));
periodogram(x,[],'onesided',512,Fs)
but this just gives me an error
??? Attempt to execute SCRIPT periodogram as a function:
C:\Users\Currys\Documents\MATLAB\periodogram.m
what did I do wrong? How can I get to see this example code in practice?
0 件のコメント
採用された回答
Sean de Wolski
2011 年 7 月 21 日
You wrote a script called 'periodogram.m' located at C:\Users\Currys\Documents\MATLAB\periodogram.m.
It's trying to call your script. Change your script's name to something else and then run it.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Spectral Measurements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!