Prev: Surface plot with real-world measured data
Next: Remove rows with duplicates elements from a matrix
From: roya olyazadeh on 30 May 2010 07:39 I have this matrix : Qx= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 I want to put it in matrix format like this : V= 1 2 3 4 . . . 14 15 what is the solution ?
From: A on 30 May 2010 07:48 On May 30, 1:39 pm, "roya olyazadeh" <roya2...(a)gmail.com> wrote: > I have this matrix : > > Qx= 1 > 2 3 > 4 5 6 > 7 8 9 10 > 11 12 13 14 15 > > I want to put it in matrix format like this : > > V= 1 > 2 > 3 > 4 > . > . > . > 14 > 15 > > what is the solution ? V = Qx.'; % transpose V = V(V~=0);
From: Bruno Luong on 30 May 2010 08:07 A <aragorn168b(a)gmail.com> wrote in message <1e5cd43b-8fea-4b5e-995f-26d4efa4d5a3(a)p5g2000pri.googlegroups.com>... > > V = Qx.'; % transpose > V = V(V~=0); Don't! If there is a 0 somewhere in the lower part of Qx, the above will give unexpected result. A better way is V = Qx.'; V = V(triu(true(size(V)))) Bruno
|
Pages: 1 Prev: Surface plot with real-world measured data Next: Remove rows with duplicates elements from a matrix |