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

呆呆 2008-10-14 16:25

[求助]变量类型问题
 
我是初学者,变了一个这样的函数:
function dxdy(hb,rua,dt)
dy=hb/10
cx=cp/sin(rua)
dx=cx*dt
在运行时提示错误:
dxdy(50,30,1)
??? Undefined function or method 'dxdy' for input arguments of type 'double'.
是什么原因,应该怎么修改啊。

galieluo 2008-10-14 21:40

回复: [求助]变量类型问题
 
改成如下:cp不知道你代表什么意思,用1代替。
function [dx dy]=dxdy(hb,rua,dt)
dy=hb/10;
cx=1/sin(rua);
dx=cx*dt;


所有时间均为北京时间。现在的时间是 08:24

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