MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   求助:向量分段求乘积 (https://www.labfans.com/bbs/showthread.php?t=3383)

fifa2002qwe 2008-05-31 23:47

求助:向量分段求乘积
 
有一个列向量,有100个元素,我 想分别求每各20个元素的乘积,例如分别求第1-20,20-40,40-60,60-80,80-100的乘积

fgabertb 2008-06-01 15:59

a=1:100; %原本的資料
prod(reshape(a,20,[]))
:smile:

fifa2002qwe 2008-06-01 22:02

thank you very much


所有时间均为北京时间。现在的时间是 12:19

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