Effacer les filtres
Effacer les filtres

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

7 vues (au cours des 30 derniers jours)
Dhaval
Dhaval le 10 Août 2023
Modifié(e) : Bruno Luong le 10 Août 2023
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 commentaires
Adam
Adam le 10 Août 2023
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 le 10 Août 2023
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?

Connectez-vous pour commenter.

Réponses (1)

Bruno Luong
Bruno Luong le 10 Août 2023
Modifié(e) : Bruno Luong le 10 Août 2023

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by