# Multiple equations solving in MATLAB

23 views (last 30 days)
I have 10 equations and 10 variables. 6 of them are non-linear and 4 of then are linear . I have 2 constraints. I have tried several programming .nothing is working out for me.
i was wondering if anyone can tell me how to solve it in MATLAB
Golam Ismot Ara taposhe on 14 Feb 2020
Hi walter
I have solved it, thank you so much for your constant support
best
Taposhe

Alex Sha on 28 Jan 2020
Hi, Golam, post out your problem, we may try.
Golam Ismot Ara taposhe on 11 Feb 2020
Hi Walter
like you said fsolve() gave me a good result but one variable is negative. I tried to use your flow this restricted_structure i am unfamilier and giving me error.
I was wondering if you can help me to figure this out
thank you so much for your time
>>F10_restricted_struct = vpasolve(F10fun, abs(F10sol), vars, repmat([0 1], nvars, 1));
Error using sym.getEqnsVars (line 32)
Arguments must be symbolic objects.
Error in sym/vpasolve (line 132)
[eqns,vars] = sym.getEqnsVars(varargin{1:N});
>> F10_restricted = double(cell2mat(struct2cell(F10_restricted_struct)));
Unrecognized function or variable 'F10_restricted_struct'.
>> F11min = fmincon(residue11, F10sol, zeros(1,nvar));
Unrecognized function or variable 'residue11'.
Did you mean:
>> F11min = fmincon(residue, F10sol, zeros(1,nvar));
Not enough input arguments.
Error in residue (line 81)
u = u(:).'; v = v(:).'; k =[];

Samatha Aleti on 28 Jan 2020
Hi,
You may use “fsolve” and “solve” functions to solve system of non-linear equations and linear equations respectively. Refer the following documentation links on detailed explanation on using “fsolve” and “solve”:
Golam Ismot Ara taposhe on 14 Feb 2020
hi walter
thank you so much for your help. will be greatful for this