[英]how to get a part of vector in matlab
I want to get parts of a vector V
with width W
As a result, I want to get M = N*M
, so that if I say M(2,:)
, I will get all the values of V(2*W : 3*W)
. 我想获得宽度为W
的向量V
的一部分。因此,我想获得M = N*M
,这样,如果我说M(2,:)
,我将获得V(2*W : 3*W)
。
Any Ideas? 有任何想法吗?
Not entirely sure what you mean, but does 不能完全确定您的意思,但是可以
M = reshape(V, W,[]);
come close? 接近? Otherwise, try 否则,请尝试
M = reshape(V, W,[]).';
or 要么
M = reshape(V, [],W);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.