Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 matlab 新手,想创建一个新向量,等于我已经拥有的一行 nxn 矩阵。我知道如何用循环来做,但是有命令吗?就像是
vector1=matrix1(row5)
谢谢!
是的,这很简单,语法是:
row5Vector = matrix1(5,:);
还可以抓取一列:
col5Vector = matrix1(:,5);