Reputation: 1865
Im trying to transpose this matrix but its not working ..
Basically I got data such as :
s=tf('s')
G=1/(s+1)
[mag phase]=bode(G,1:5)
And i get the following for phase :
phase(:,:,1) =
-45
phase(:,:,2) =
-63.4349
phase(:,:,3) =
-71.5651
phase(:,:,4) =
-75.9638
phase(:,:,5) =
-78.6901
Is there a way to put all the values in one column ?
I tried using phase' or phase.'
but I get an error ..
Thanks !
Upvotes: 1
Views: 562
Reputation: 42225
You can do phase=phase(:)
to eliminate the singleton dimensions and organize it as a column vector.
In general, if you have more than one non-singleton dimensions and you only need to remove the singleton dimensions, use squeeze()
.
Upvotes: 4