Effacer les filtres
Effacer les filtres

what is command for circularly writing a row matrix in matlab

1 vue (au cours des 30 derniers jours)
Satishkumar D
Satishkumar D le 2 Sep 2015
Commenté : Stephen23 le 4 Sep 2015
example: let
a=[1 2 3 4 5]
i want output like
b=[ 1 2 3 4 5;
5 1 2 3 4;
4 5 1 2 3;
3 4 5 1 2;
2 3 4 5 1]
please help me

Réponse acceptée

Walter Roberson
Walter Roberson le 2 Sep 2015
toeplitz() ?
  3 commentaires
Satishkumar D
Satishkumar D le 2 Sep 2015
i just tried.. output is getting like below
1 2 3 4
2 1 2 3
3 2 1 2
4 3 2 1
if a=[1 2 3 4 5] but i want output
[ 1 2 3 4 5; 5 1 2 3 4; 4 5 1 2 3; 3 4 5 1 2; 2 3 4 5 1]
Satishkumar D
Satishkumar D le 2 Sep 2015
thanks Stephen Cobeldick

Connectez-vous pour commenter.

Plus de réponses (1)

Steven Lord
Steven Lord le 2 Sep 2015
gallery('circul', 1:5)

Community Treasure Hunt

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

Start Hunting!

Translated by