필터 지우기
필터 지우기

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

조회 수: 7 (최근 30일)
Dhaval
Dhaval 2023년 8월 10일
편집: Bruno Luong 2023년 8월 10일
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