フィルターのクリア

How do I use power_fftscope for batch mode?

5 ビュー (過去 30 日間)
Richard
Richard 2014 年 5 月 28 日
コメント済み: Richard 2014 年 6 月 5 日
Hello all,
I have found the various questions and answers that show the command bellow to get a struct of fft results.
sps = power_fftscope(bdroot)
My question is two part, first when I run this command Matlab 2013a returns an empty array even though the model and powergui display is fully populated. bdroot returns the path to the model that has the data. Is there a way to fix this?
If I run the next command, where ScopeData is the struct of signals from my scope, I receive an elementary fft analysis with default values. Is there a way to manually define the parameters in second argument I pass power_fftscope so I can have it analyze my results as I desire?
sps = power_fftscope(ScopeData)
Thank you for your assistance.

採用された回答

Rashmil Dahanayake
Rashmil Dahanayake 2014 年 5 月 29 日
編集済み: Rashmil Dahanayake 2014 年 5 月 31 日
The steps are as follow.If you have ScopeData in your workspace as "ScopeData3"
% Exporting signal data to fftscope
FFTDATA=power_fftscope(ScopeData3);
% setting parameters for fftscope
FFTDATA.cycles=4;
FFTDATA.THDmaxFrequency=1000;
FFTDATA.startTime=3.8;
FFTDATA.fundamental=50; % set other parameters as required
% Now run the fftscope to get the analysis results
results_fft= power_fftscope(FFTDATA);
Furthermore you can use the fftscope to perform FFT for other signals outside simulink. refer to this tool in fileexchange
  1 件のコメント
Richard
Richard 2014 年 6 月 5 日
Thanks for the solution it works brilliantly, it was running the function on the struct twice that I was missing.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by