Réponse acceptée

Wayne King
Wayne King le 16 Août 2012
Modifié(e) : Wayne King le 16 Août 2012
Do you have the Signal Processing Toolbox?
x = [1 2 3 4];
x = upsample(x,2);
If not
x = 1:4;
y = zeros(2*length(x),1);
y(1:2:end) = x;
If you have the Wavelet Toolbox
x = 1:4;
y = dyadup(x,0);

1 commentaire

Matt Fig
Matt Fig le 16 Août 2012
I learn something new everyday. I didn't know there was a function to do this! Thanks, Wayne.

Connectez-vous pour commenter.

Plus de réponses (1)

per isakson
per isakson le 16 Août 2012
Modifié(e) : per isakson le 16 Août 2012
One more way to do it
x = 1:4;
x1 = cat( 1, x, zeros(size(x)) );
x1 = transpose(x1(:));

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by