matlab程序运行出现?Input argument "x" is undefined.Error in ==> myfun at 2 F = [ 2*x(1)程序:function F = myfun(x,c)F = [ 2*x(1) - x(2) - exp(c*x(1))-x(1) + 2*x(2) - exp(c*x(2))];c = -1; % define parameter firstx = fsolve(@(x) myfun(x,c),[-5
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/10 14:40:22
![matlab程序运行出现?Input argument](/uploads/image/z/15091552-64-2.jpg?t=matlab%E7%A8%8B%E5%BA%8F%E8%BF%90%E8%A1%8C%E5%87%BA%E7%8E%B0%3FInput+argument+%22x%22+is+undefined.Error+in+%3D%3D%3E+myfun+at+2+F+%3D+%5B+2%2Ax%281%29%E7%A8%8B%E5%BA%8F%EF%BC%9Afunction+F+%3D+myfun%28x%2Cc%29F+%3D+%5B+2%2Ax%281%29+-+x%282%29+-+exp%28c%2Ax%281%29%29-x%281%29+%2B+2%2Ax%282%29+-+exp%28c%2Ax%282%29%29%5D%3Bc+%3D+-1%3B+%25+define+parameter+firstx+%3D+fsolve%28%40%28x%29+myfun%28x%2Cc%29%2C%5B-5)
matlab程序运行出现?Input argument "x" is undefined.Error in ==> myfun at 2 F = [ 2*x(1)程序:function F = myfun(x,c)F = [ 2*x(1) - x(2) - exp(c*x(1))-x(1) + 2*x(2) - exp(c*x(2))];c = -1; % define parameter firstx = fsolve(@(x) myfun(x,c),[-5
matlab程序运行出现?Input argument "x" is undefined.Error in ==> myfun at 2 F = [ 2*x(1)
程序:
function F = myfun(x,c)
F = [ 2*x(1) - x(2) - exp(c*x(1))
-x(1) + 2*x(2) - exp(c*x(2))];
c = -1; % define parameter first
x = fsolve(@(x) myfun(x,c),[-5;-5])
end
matlab程序运行出现?Input argument "x" is undefined.Error in ==> myfun at 2 F = [ 2*x(1)程序:function F = myfun(x,c)F = [ 2*x(1) - x(2) - exp(c*x(1))-x(1) + 2*x(2) - exp(c*x(2))];c = -1; % define parameter firstx = fsolve(@(x) myfun(x,c),[-5
你是怎么运行的啊