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

huyanan008 2008-05-05 17:24

[求助]关于函数定义的问题
 
定义函数如
function ch(x,y)
ch(x,y)=x+y
输入ch(3,3),为什么结果事
0 0 0
0 0 0
0 0 6
而不是“6”呢
谢谢赐教

hzxsyzl943 2008-05-06 16:03

期待高手:tongue:

shiqiang 2008-05-06 16:36

这个问题很简单,ch(x,y)=x+y,在matlab中表达的是矩阵ch在(x,y)位置上的值为x+y,所以结果就会这个样子呀,


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

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