Can someone help me with Matlab fsolve
Show older comments
Hi, i'm trying to run this function below, but it keeps showing error on line 242. I have no idea what i'm doing wrong. Can someone help me out!
Thanks a lot!
function F = myfun(x)
F(1) = (x(2)/x(1)) - ((0.3)/((1/0.99)-(1-0.025)))^(1/(1-0.3));
F(2) = ((1-x(1))^(2/0.025)/x(1)) - (((x(2)/x(1))^0.3 - 0.025*(x(2)/x(1))) / (1-0.3)^(1/0.025)*((x(2)/x(1)))^(0.3/0.025));
fun = @myfun;
x0 = [1,1];
x = fsolve(fun,x0)
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!