Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

mat transpose .t() a Nx2 mat gives me a 1x2N output.

Hi a Nx2 mat variable temp that has form [a,b; c,d; e,f; ...,...] in cout<<temp when="" i="" type="" temp.rows="" it="" gives="" me="" n,="" when="" i="" type="" temp.cols="" it="" gives="" me="" 1!!!!!!="" hence="" when="" i="" used="" temp.t()="" the="" cout="" output="" is="" a="" 1x2n="" row="" vector.="" what="" happened="" ?="" thx="" <="" p="">

mat transpose .t() a Nx2 mat gives me a 1x2N output.

Hi a Nx2 mat variable temp that has form

[a,b;
c,d;
e,f;
...,...]

in cout<<temp when="" i="" type="" temp.rows="" it="" gives="" me="" n,="" when="" i="" type="" temp.cols="" it="" gives="" me="" 1!!!!!!="" hence="" when="" i="" used="" temp.t()="" the="" cout="" output="" is="" a="" 1x2n="" row="" vector.="" what="" happened="" ?="" thx="" <="" p=""> cout<<temp when i type temp.rows it gives me N, when i type temp.cols it gives me 1!!!!!! hence when I used temp.t() the cout output is a 1x2N row vector.

What happened ? Thx