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=903)

5827418 2007-12-05 13:44

【求助】这段代码怎么只有一个输出值
 
具体如下

m1=-60:-1;
t2=m1*0.004;
h1=(2*cos(204*t2).*sin(78*t2))/(pi*t2);
h1

输出t2 有60个值
为什么h1只有1个输出值啊 也应该是60个啊

markh 2007-12-06 19:51

[QUOTE=5827418;3672]具体如下

m1=-60:-1;
t2=m1*0.004;
h1=(2*cos(204*t2).*sin(78*t2))/(pi*t2);
h1

输出t2 有60个值
为什么h1只有1个输出值啊 也应该是60个啊[/QUOTE]

试下

h1=(2*cos(204*t2).*sin(78*t2))./(pi*t2);

elunxu 2007-12-20 22:14

记住:数组与数组之间需要用点乘


所有时间均为北京时间。现在的时间是 09:45

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