how to plot curve in matlab

3 次查看(过去 30 天)
saman ahmadi
saman ahmadi 2020-9-5
编辑: KSSV 2020-9-6
Hi. How can i plot below equation?
thank you very much
f=(31*f^6)/49000000000 - (667*f^2)/39200 - (657*f^4)/98000000 - (375*cos(qa))/28 - (f^2*cos(qa))/400 + (3*f^4*cos(qa))/7000000 + 375/28;
  3 个评论
saman ahmadi
saman ahmadi 2020-9-5
Excuse me, it is below, I want to plot curve(qa vs f). thank you
(31*f^6)/49000000000 - (667*f^2)/39200 - (657*f^4)/98000000 - (375*cos(qa))/28 - (f^2*cos(qa))/400 + (3*f^4*cos(qa))/7000000 + 375/28=0;
David Hill
David Hill 2020-9-5
For each qa there potentailly could be six real solutions for f. How do you want to plot that? You could plot the equation's value for different values of qa. For example:
qa=pi/4;%change qa to desired values.
y=@(f)(31*f.^6)/49000000000 - (667*f.^2)/39200 - (657*f.^4)/98000000 - (375*cos(qa))/28 - (f.^2*cos(qa))/400 + (3*f.^4*cos(qa))/7000000 + 375/28;
f=-115:.01:115;
plot(f,y(f));

请先登录,再进行评论。

回答(1 个)

KSSV
KSSV 2020-9-6
编辑:KSSV 2020-9-6
Are you looking for something like this?
qa = linspace(-pi,+pi,200) ; % give your ranges
f= linspace(-115,115,200) ; % give your ranges
[f,qa] = meshgrid(f,qa) ; % for a mesh
y=@(f,qa)(31*f.^6)/49000000000 - (667*f.^2)/39200 - (657*f.^4)/98000000 - (375*cos(qa))/28 - (f.^2.*cos(qa))/400 + (3*f.^4.*cos(qa))/7000000 + 375/28;
y = y(f,qa) ;
contour(f,qa,y,[0 0])

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by