Solving equations in terms of expression
Show older comments
Hello everyone, I have 6 equations to solve in MATLAB. I have written a program for that, but the problem is it showing zero value with a warning "Explicit solution could not be found.". I don't know where I am going wrong or may be I should use some other technique to solve this. Please help me to solve this problem.
Thank you.
X = [0.122;0.0578;0.0138;0.147;0.0718;0.0151];
Y = [12;12;12;42;42;42];
Z = [0.000375;0.0015;0.01125;0.000375;0.0015;0.01125];
syms a b c d e f
eq1 = a*(1+tanh(log((b/Z(1))^c)))*Y(1)*d*(1+tanh(log((e/Z(1))^f))) == X(1);
eq2 = a*(1+tanh(log((b/Z(2))^c)))*Y(2)*d*(1+tanh(log((e/Z(2))^f))) == X(2);
eq3 = a*(1+tanh(log((b/Z(3))^c)))*Y(3)*d*(1+tanh(log((e/Z(3))^f))) == X(3);
eq4 = a*(1+tanh(log((b/Z(4))^c)))*Y(4)*d*(1+tanh(log((e/Z(4))^f))) == X(4);
eq5 = a*(1+tanh(log((b/Z(5))^c)))*Y(5)*d*(1+tanh(log((e/Z(5))^f))) == X(5);
eq6 = a*(1+tanh(log((b/Z(6))^c)))*Y(6)*d*(1+tanh(log((e/Z(6))^f))) == X(6);
sol=solve([eq1,eq2,eq3,eq4,eq5,eq6],'a','b','c','d','e','f');
Accepted Answer
More Answers (1)
Torsten
on 5 Jul 2017
0 votes
Since no symbolic solution is in sight for your system, use "vpasolve" instead of "solve".
Or try another numerical solver like lsqnonlin or fsolve.
Best wishes
Torsten.
4 Comments
Deepti Ranjan Majhi
on 6 Jul 2017
sol=vpasolve([eq1,eq2,eq3,eq4,eq5,eq6],[a,b,c,d,e,f]);
sol.a
sol.b
sol.c
sol.d
sol.e
sol.f
does not work ?
Best wishes
Torsten.
Deepti Ranjan Majhi
on 6 Jul 2017
Categories
Find more on Mathematics 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!