I don't understand what this u(:,1) does to matrix or vector?

 采纳的回答

pfb
pfb 2015-4-27
编辑:pfb 2015-4-27
It gives you the first column of the array u.
If u is a row vector, that is the 1st element.
if u is a column vector, that is the entire vector.
If you want to transform a row vector into a column, see u', transpose(u), or u(:).

4 个评论

thanks, By array you mean a matrix right?
yes.
Note that u' and transpose(u) have different effects for complex numbers.
I have also come across the following notation x(:)? Do you know what it means?

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by