how full square matrix first column as second column in matlab

hello guys i have a full square matrix wish to use this matrix first column as a second column
and second column as third column
and third column as fourth column

Answers (1)

Hi Singh,
It sounds a little bit confusing. So if I'm wrong (which I probably am) please give us further clue on what you exactly after.
To me it sounds like you need to shift the matrix to write! Which is a simple task! However I don't know what's gonna happen to the last column! I assume you wanna keep it in last+1 column!
Based on all these not true assumptions I made I guess you will be good with a horizontal concatenation.
newData = horzcat(zeros(size(data,1),1),data);
However I don't think you're after something so easy.
Please explain your problem
Good Luck!

3 Comments

Salaheddin Hosseinzadeh,i wish to full square matrix first column is all 0
DG2 =
0 20.2581 82.1517 86.5606 88.6312
0 0 82.3752 67.9051 73.8848
0 0 0 88.7142 65.5844
0 0 0 0 28.1114
and next tym i delete the first column than it will be full square matrix
DG2 =
20.2581 82.1517 86.5606 88.6312
0 82.3752 67.9051 73.8848
0 0 88.7142 65.5844
0 0 0 28.1114
and after deletion first column from DG2 than first column treat as first column but i wish it is treat as second column because when i plot on the biograph than self connecting nodes are not allowed
h = view(biograph(DG2,[],'ShowWeights','on'))
Warning: Self connecting nodes are not allowed, ignoring the diagonal of CM.
in biograph i have five node but it will show only 4 andi have 10 edges but it will show only 6 edge.
Dear Singh,
I'm afraid I have no idea what is a biograph!
Have a look it may help you to define your biograph completely before viewing it.

Sign in to comment.

Categories

Asked:

on 28 May 2015

Community Treasure Hunt

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

Start Hunting!