solving for y in equation
Afficher commentaires plus anciens
I want to solve for y in following equation. It returns y with conditions. Next i want to plot using the calculated y as function definition, but i dont know how to do that. Here is my code:
syms x a h y v u
a = 85.147;
h = 55;
v = 50;
u = 25;
assume(x>=0)
x1 = 0:0.1:10;
eqn = x-sqrt(a^2+h^2)-(h-y)*cot(asin((h-y)/v))+(h-u)*cot(pi/4-asin((h-y)/v))+v*sin(asin((h-y)/v)) == 0
soly = isolate(eqn, y)
plot(x1,soly)
Réponses (1)
a = 85.147;
h = 55;
v = 50;
u = 25;
f = @(x,y)x-sqrt(a^2+h^2)-(h-y).*cot(asin((h-y)/v))+(h-u)*cot(pi/4-asin((h-y)/v))+v*sin(asin((h-y)/v))
r = fimplicit(f,[-100 300 0 70])
r.XData
r.YData
f(r.XData,r.YData)
Catégories
En savoir plus sur Financial Toolbox 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!
