nan22nan
nan22nan
采纳率50%
2015-05-12 07:18 阅读 1.7k
已采纳

为啥这段matlab函数用java调用会出错?

3

function [ ] = pleaseagain(Request,N)
function y=f(x)
y=0.5*19.2*N+x-x;
end
function h=g(m)
h=quadl(@f,m,1)-Request;
end
fzero(@g,-1); %查找fun函数在x0附近的零点
end

错误提示:
Error using fzero (line 289)
FZERO cannot continue because user supplied function_handle ==> pleaseagain/g
failed with the error below.

Integers can only be combined with integers of the same class, or scalar doubles.

新手跪求指点!~(>_<)~

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    nan22nan nan22nan 2015-05-12 07:19

    在matlab里面运行没有问题的呜呜!

    点赞 评论 复制链接分享

相关推荐