MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   八度/ Matlab:扩展向量使其自身重复吗? (https://www.labfans.com/bbs/showthread.php?t=23215)

poster 2019-12-10 20:30

八度/ Matlab:扩展向量使其自身重复吗?
 
有没有办法通过使向量重复自身来扩展向量?

>v = [1 2]; >v10 = vx 5; %x represents some function. Something like "1 2" x 5 in perl 那么v10将是:

>v10 1 2 1 2 1 2 1 2 1 2 这应该适用于一般情况,而不仅仅是[1 2]



[B]回答:[/B]

您要查找的函数是[URL="http://www.gnu.org/software/octave/doc/interpreter/Special-Utility-Matrices.html#XREFrepmat"]repmat()[/URL] 。

v10 = repmat(v, 1, 5)

[url=https://stackoverflow.com/questions/2459851]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 04:49

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.