Transpose of a vector without builtin MATLAB command -
does 1 know how can convert row vector [6 8 2]
column vector without using builtin command. without loop.a ny idea please. 1 asked me home work no, it's part of work. trying convert matlab code vhdl using hdl coder hdl coder seems not supporting transpose function.
you can use (:)
trick
t = [1 2 3]; t(:) ans = 1 2 3
update: should use method in following case: have vector (not matrix) , want make sure column-vector. method useful, when don't know type (column, row) of vector variable has.
check out
t = [1 2 3]'; %// column vector t(:) ans = 1 2 3
however
a=magic(3); a(:) ans = 8 3 4 1 5 9 6 7 2
Comments
Post a Comment