matlab code for taking very less sample
조회 수: 2 (최근 30일)
이전 댓글 표시
I have to take a few samples from a sinusodial signal.I have generated sinusodial signal using sin. But i am unable to write the matlab code to take very less samples from that sinusodial signal.please help............
댓글 수: 0
채택된 답변
Oleg Komarov
2013년 2월 20일
편집: Oleg Komarov
2013년 2월 20일
You might find the getting started guide very useful, second and third chapters are a good investment.
% Sample data
x = 1:100;
y = sin(x);
% Take every 10
y(1:10:100)
댓글 수: 0
추가 답변 (2개)
Azzi Abdelmalek
2013년 2월 20일
If you have a Signal Processing toolbox, you can use downsample function
댓글 수: 0
Image Analyst
2013년 2월 20일
Try this on the signal you have generated to take every 5th sample:
subSampledSignal = yourSignal(1:5:end);
Adapt as needed.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!