How to findout this equations value
Afficher commentaires plus anciens
R*e^15b=35.75
R*e^25b=29.125
R*e^35b=22.875
I need to find out the value of R and b from above equaations. Is there any command in matlab to findout this calculation?
Réponse acceptée
Plus de réponses (2)
Saksham Gupta
le 5 Juil 2022
As per my understanding, you wish to solve the given equations
You may use the following code to solve them:
syms R b
eqns = [ R*exp(15*b) == 35.75 , R*exp(25*b) == 29.125 ];
a = solve( eqns , [ R ,b ] );
disp(a.R);
disp(a.b);
I am using 2 equations only as I am able to identify only 2 variables : 'R' and 'b'.
My output is:

R12 = 48.6173; % solving Eqn 1 and Eqn 2 simultaneously
R23 = 53.2756; % solving Eqn 2 and Eqn 3 simultaneously
R31 = 49.9703; % solving Eqn 3 and Eqn 1 simultaneously
b12 = -0.020495335725415202423043826631973699411349908259696363801512111;
b23 = -0.024155230072427962515559053432074702762580354955690539307109413;
b31 = -0.022325282898921582469301440032024201086965131607693451554310762;
x = linspace(10, 40, 3001);
y1 = R12*exp(b12*x);
y2 = R23*exp(b23*x);
y3 = R31*exp(b31*x);
plot(x', [y1' y2' y3'], 'LineWidth', 1.5), grid on, hold on,
plot([15 25 35], [35.75 29.125 22.875], 'mo', 'MarkerSize', 12, 'LineWidth', 2), hold off
xlabel('x'), ylabel('y'),
legend('y1', 'y2', 'y3')
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
