How to solve for a range of values
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Richard Baird
le 31 Mar 2021
Réponse apportée : Walter Roberson
le 31 Mar 2021
I have a very simple expression with 2 variables , R1 and R2, that depend on each other. I want to plot the solution for R2 given a range of values for R1.
Here is what I have so far:
syms R2 positive
V = -9;
R1 = [100:100:1e6];
EQ = V.*(R1./(R1 + R2)) == -2.3;
plot(R1,solve(EQ,R2)) % produces an error, vectors must be of the same length
0 commentaires
Réponse acceptée
Walter Roberson
le 31 Mar 2021
syms r1 r2 positive
V = -9;
R1 = [100:100:1e6];
EQ = V.*(r1./(r1 + r2)) == -2.3;
R2sol = solve(EQ,r2);
R2 = double(subs(R2sol, r1, R1));
plot(R1, R2)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
