fsolve - "Not enough input arguments"
4 views (last 30 days)
Show older comments
Hello all,
Please bear with me, as I'm just learning MATlab. I'm having trouble using fsolve to solve a set of equations. This is what I have so far:
function F = eqns(x)
x0 = [190 130];
%%x(1) is T_roof, x(2) is T_attic%%
F = [-(11079926996490695535*(x(1) + 45967/100)^4)/4835703278458516698824704 + 835*x(2) - (5482846673300357*x(1))/2199023255552;
835*x(1) - (36965966212295679*x(2))/35184372088832 + 324703121573247955/17592186044416];
x = fsolve(@eqns,x0);
end
When I try to run the program, I get an error message in the workspace saying that there are not enough input arguments. Any help would be greatly appreciated.
If anyone could give me a hand, I would greatly appreciate it. Thanks! if true
0 Comments
Answers (2)
Walter Roberson
on 10 Dec 2012
Edited: Walter Roberson
on 10 Dec 2012
function x = Start
x0 = [190 130];
x = fsolve(@eqns,x0);
end
function F = eqns(x)
%%x(1) is T_roof, x(2) is T_attic%%
F = [-(11079926996490695535*(x(1) + 45967/100)^4)/4835703278458516698824704 + 835*x(2) - (5482846673300357*x(1))/2199023255552;
835*x(1) - (36965966212295679*x(2))/35184372088832 + 324703121573247955/17592186044416];
end
Store this in Start.m and invoke Start
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!