필터 지우기
필터 지우기

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