Solve and save the value in a variable
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Kartavya
il 1 Apr 2014
Commentato: Azzi Abdelmalek
il 1 Apr 2014
Hi, I'm very new to matlab and I have a problem I'm trying to solve. I need to get first value answer of 0.15=m(1-sqrt(m/3)) This will have two solutions and I need to save the first solution in a variable m.
This is part of a bigger program that I'm trying to write.
I need a numerical answer of about 4 digits that I can use to solve other equations. the value should be 0.2027.
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 1 Apr 2014
sol=solve('0.15==m*(1-sqrt(m/3))')
2 Commenti
Azzi Abdelmalek
il 1 Apr 2014
To get the real part of the second solution use
double(real(sol(2)))
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Calculus in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!