Solve function (and other code help)
Afficher commentaires plus anciens
I wish to find what Z is at these heights, so I looked up the code for it S = solve(eqn,var)
Z = solve(Re.*Z/Re.+Z=.hi, Z)
hi = [0 , 11 , 20, 32 , 47, 51 , 71 , 84.852 , 90 ]
Re = 6356.766
However it returns me
>> solve(Re.*Z/Re.+Z==.hi)(Z)
solve(Re.*Z/Re.+Z==.hi)(Z)
↑
Error: Invalid use of operator. (over the plus symbol)
Am I doing something wrong? I am a little confused this the code I looked up just says write solve, your equation = (something) (variable)
Other code help:
P2 = 101325 * exp(-B((h-h(1))/t(1)) - This was just a manual calculation I will use to see if I had written anything wrong.
ai = [-6.5000, 0, 1.0000, 2.8013, -0.0050, -2.8000, -2.0000,0]
B =(go/Rs)
go = 9.80666
Rs = .287054
B (returns value of 34.1631) %okay no problems here
But my full equation is (to edit this question further)
3 commentaires
KSSV
le 7 Sep 2020
Are you sure about the equation/ expression?
Re*Z/Re+Z==hi
Re gets cancelled...there is no point in the expression for Re. Z = hi/2; this what you get.
Liam Crocker
le 7 Sep 2020
Liam Crocker
le 7 Sep 2020
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Code Performance 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!



