Plotting a Spectrogram with data from a csv file
古いコメントを表示
Hi I have some data in a csv file. The actual data has 1048576 lines and is too big to upload so I'm attaching a chunk of it which has only 10462 lines of data (trial3.csv). I would like to plot a Spectrogram using these values.
I am using the following lines to plot the data.
Array=csvread('trial3.csv');
col1 = Array(:, 1);
col2 = Array(:, 2);
plot(col1, col2)
%[S,F,T]=spectrogram(Array,32,16,32,100)
Can someone tell me how to make a spectrogram out of it please?
Thanks
Winee
採用された回答
その他の回答 (1 件)
Wayne King
2013 年 12 月 4 日
0 投票
I don't see the attachment.
You have to obtain the spectrogram on a 1-D signal, not a matrix. So is col2 your data?
What is the sampling interval for this data -- time between measurements.
I doubt that 32 points is enough to get a good spectrogram, I would recommend making your window larger than that, but without more details about your data, it's hard to make a more concrete recommendation.
4 件のコメント
Wayne King
2013 年 12 月 4 日
Just pasting those few lines doesn't help, please provide the sampling frequency and if you can which frequency range are you especially interested in.
If you can provide that detail, I can make up and example.
Win
2013 年 12 月 4 日
Win
2013 年 12 月 4 日
カテゴリ
ヘルプ センター および File Exchange で Time-Frequency Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!