Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2008-10-16
年龄: 44
帖子: 3
声望力: 0 ![]() |
![]()
各位方家好:
我写了一段程序,大家给看看有什么毛病 function y=ceshi(x) if x>=0 y=1; else y=0 end 然后把它保存为ceshi.m 接着用数值积分 quad('ceshi',0,1) 这时出现错误 ??? Attempted to access y(7); index out of bounds because numel(y)=1. Error in ==> quad at 71 if ~isfinite(y(7)) 这是怎么回事呀? 谢谢! |
![]() |
![]() |