
Symbolic toolbox help using solve command
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have the following simple code and Im not sure how else to solve it for more than one equation, the variable hl and hr can change at any time so I want matlab to automatically solve for the different equation im assuming its something simple that i have missed, thanks in advance kyle
hl = 1;
hr = 0.1;
g=9.81;
syms s
geneqn = s*((s - ((g*hr)/(4*s))*(1+(sqrt(1+((8*s^2)/(g*hr)))))) + 2*(sqrt(((g*hr)/2)*(sqrt(1+((8*s^2)/(g*hr)))-1))) - 2*sqrt(g*hl));
S = solve('geneqn=0')
s=0 << %I know that this is not correct
0 comentarios
Respuesta aceptada
Andrei Bobrov
el 12 de Mzo. de 2012
hl = 1; hr = 0.1; g=9.81;
syms s
geneqn = s*((s - ((g*hr)/(4*s))*(1+(sqrt(1+((8*s^2)/(g*hr))))))...
+ 2*(sqrt(((g*hr)/2)*(sqrt(1+((8*s^2)/(g*hr)))-1))) - 2*sqrt(g*hl));
out = solve(geneqn,s)
on my PC:

Más respuestas (0)
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!