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.
我想获得V具有宽度的向量的一部分W 结果,我想获得M = N*M,所以如果我说M(2,:),我将获得 的所有值V(2*W : 3*W)。
V
W
M = N*M
M(2,:)
V(2*W : 3*W)
有任何想法吗?
不完全确定你的意思,但确实
M = reshape(V, W,[]);
接近?否则,请尝试
M = reshape(V, W,[]).';
或者
M = reshape(V, [],W);