function [ F ] = roots( x )%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
F(1) = (2.6-95/(x(1)-292.96))*x(2) + (95*x(1))/(x(1)-292.96) - 6.8297e3;F(2) = -(2.6-95/(x(1)-292.96))*x(2) +2.7831e4/(x(1)-292.96) + 3.7105e3;endfun = @roots;x0 = 100*ones(1, 2);x = fsolve(fun, x0);
when i run the code it says that the solver stopped prematurely and i get wrong values for x(1) and x(2). I tried to increase the MaxFunEvals and the MaxIter as follows:
fun = @roots;x0 = 100*ones(1, 2);options = optimset('MaxFunEvals',10000);options = optimset(options,'MaxIter',10000);x = fsolve(fun, x0, options);
However, i am still getting the same error. Any ideas on how to solve this issue ?
Best Answer