how to plot curve in matlab
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
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
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])
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!