Data processing

9 ビュー (過去 30 日間)
John
John 2011 年 11 月 13 日
Hello, How to sample data for every 40 ms. As my data is quite big (75000ms)I'd like to display only every 40th sample of my data in a form of simple table (1st row :ms), second row:values)
Thanks for your help.

採用された回答

Image Analyst
Image Analyst 2011 年 11 月 13 日
Just do what you did and then say
y = y(1:40:end);
By the way, that (75,000 elements) is a long, long way from being a "quite big" matrix.
  6 件のコメント
Image Analyst
Image Analyst 2011 年 11 月 14 日
I feel you're leaving off the end of the story here. What do you really plan on doing with the data? Look for spikes/peaks? Look for valleys? Look for some kind of pattern? You're not just going to visually examine thousands of points and that's the end of it. What's the next step?
Walter Roberson
Walter Roberson 2011 年 11 月 14 日
Sounds like a sparse() matrix might be appropriate. But it depends on how you want to examine your data. Sometimes with data like this, you are best off just using a tool such as SPSS.

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

その他の回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2011 年 11 月 13 日
Here is a different way to do it.
t=[00 08 255 267 298 300];
y=[5 4 3 4 3 2];
figure(1);hold on;
stairs(t,y);
tnew=0:40:400;
index=bsxfun(@le,t',tnew);
ynew=y(sum(index));
stem(tnew,ynew);

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by