Which method I can use for reduce number of samples or Increase the samples?

7 次查看(过去 30 天)
Hello,
I am working on some test data. And there are 2 types of files in the data, some files hase 10000 number of samples and some has 20000 number of samples. based on number of samples i am getting two sampling time 0.0001 and 0.00005. For further proccess, I am using sampling time for plot the graph but it takes only one sampling time for all data while plot the graph an I think results are not correct.
So, I want to ask you that, which method I can use to convert both number of samples into one number of samples and use it for plot the graph?
(like convert 10000 samples to 20000 OR 20000 samples to 10000) Also need little bit guidance like, How can I do it?
Thanks in Advance!
  2 个评论
Adam
Adam 2023-8-10
You can have two plots on the same axes with different numbers of samples if that is the only reason for which you want to downsample.
e.g.
plot( 1:10, rand(1,10) )
hold on
plot( 1:0.1:10, rand( 1, 91 ) )
Dhaval
Dhaval 2023-8-10
Thanks Adam!
Actually, I want to use only one sampling time for all my data. if I put both samples in one plot it's hard to read and it makes congested plot becuase I have other parameters in the plot. I have data like in raw and column(1:10000 and 1:20000). That's why I want to know which method is easy, and how can I do it?

请先登录,再进行评论。

回答(1 个)

Bruno Luong
Bruno Luong 2023-8-10
编辑:Bruno Luong 2023-8-10

类别

Help CenterFile Exchange 中查找有关 Multirate Signal Processing 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by