command 'downsample' in matlab doesn't work

for example :
x = [1 2 3 4 5 6 7 8 9 10];
y = downsample(x)
we see :
y =
2 4 6 8 10
but for :
x = [1 2 3 4 5 6 7 8 9 10];
y = downsample(x,3)
it doesn't work
in matlab R2011b

 採用された回答

Wayne King
Wayne King 2011 年 11 月 7 日

0 投票

I think you need to give the error message, if any, you receive in R2010b. Do you have the Signal Processing Toolbox in your R2010b installation?
Enter
>>ver
to make sure you have the SP Toolbox.
I have no problem with this:
x = [1 2 3 4 5 6 7 8 9 10];
y = downsample(x,3);
in R2010b.

3 件のコメント

amid aliaghazadeh
amid aliaghazadeh 2011 年 11 月 7 日
yes I have
Wayne King
Wayne King 2011 年 11 月 7 日
Then what is not working for you. What error message are you getting?
amid aliaghazadeh
amid aliaghazadeh 2011 年 11 月 7 日
??? Error using ==> downsample
Too many input arguments.

サインインしてコメントする。

その他の回答 (1 件)

Wayne King
Wayne King 2011 年 11 月 7 日

3 投票

Please enter:
>>which downsample
at the command line. I think in your R2010b version you have some other downsample.m (which is not the MATHWORKS version).
If this other downsample.m precedes the MATHWORKS version on your path, then you are calling that program and not the MATHWORKS version.
If you do not get back something like:
toolbox/signal/signal/downsample.m
then you have a different version of downsample.m

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by