Plotting a non-linear graph in Matlab
이전 댓글 표시
Hi guys,
I have this equation f(g)=1+cos(g)*cosh(g)-a*g*(cos(g)*sinh(g)-sin(g)*cosh(g))=0. I am trying to plot it for (a,g).
I have the initial condition that when a=0 then g=1.8751.
I am not sure how to code it as an equation with two unknowns and two initial values ??
My suggestion would be to plot the graph by using the solve function by using a=a+da (where da is small increment of a) and using the previous value of g as an initial value to find g for the new value of a.
Regards, Rihab
댓글 수: 3
Muhammad Usman Saleem
2016년 10월 15일
편집: Walter Roberson
2016년 10월 16일
f(g)=1+cos(g)*cosh(g)-a*g*(cos(g)*sinh(g)-sin(g)*cosh(g))=0.
there are two equality sign in this equation write correct one plz
Rihab el-Wali
2016년 10월 15일
Muhammad Usman Saleem
2016년 10월 15일
good night, tomorrow will guide u in this regards
채택된 답변
추가 답변 (1개)
Star Strider
2016년 10월 15일
편집: Star Strider
2016년 10월 15일
When in doubt, plot first:
[A,G] = meshgrid(-0.5:0.01:0.5, -20:0.1:20);
fga = @(a,g) 1+cos(g).*cosh(g)-a.*g.*(cos(g).*sinh(g)-sin(g).*cosh(g))
F = fga(A,G);
figure(1)
meshc(A, G, F)
grid on

There appear to be a possibly infinite number of solutions. Which one do you want?
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!