MATLAB Answers

How to downsample a vector x by an integer factor M with a single statement such as for loop or conditional statements

조회 수: 5(최근 30일)
William 2021년 9월 16일
댓글: William 2021년 9월 16일
I have already learned to use downsample()function. However, are there ways to use statements to downsample a vector?

채택된 답변

Chunru 2021년 9월 16일
a = 1:10;
b = downsample(a, 3) % use downsample
b = 1×4
1 4 7 10
c = a(1:3:end) % statement
c = 1×4
1 4 7 10
  댓글 수: 3

댓글을 달려면 로그인하십시오.

추가 답변(0개)




Community Treasure Hunt

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

Start Hunting!

Translated by