solving for y in equation
이전 댓글 표시
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)
답변 (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)
카테고리
도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
