export PSD object

How do I export the information contained in the psd output so that I can plot the data and frequencies using a non-MATLAB program such as gnuplot

 채택된 답변

Daniel Shub
Daniel Shub 2011년 7월 19일

0 개 추천

Assuming you are using the newish version of psd objects ...
Starting with the example from spectrum:
Fs = 1000;
t = 0:1/Fs:.296;
x = cos(2*pi*t*200)+randn(size(t));
h = spectrum.welch;
Hpsd = psd(h,x,'Fs',Fs);
Then you could simply do:
csvwrite('filename.txt', [Hpsd.Frequencies, Hpsd.Data])

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Simulation, Tuning, and Visualization에 대해 자세히 알아보기

질문:

2011년 7월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by