How to plot general solution of a trigonometric function???

조회 수: 1 (최근 30일)
HARSHA GYANANI
HARSHA GYANANI 2018년 4월 11일
댓글: Walter Roberson 2020년 3월 21일
I want to plot a graph of a and b defined by this equation. 1-2*cosd(a)+2*cosd(b)=0 when I started plotting only graph of the principal solutions of cos is considered. whereas i want all possibilities of general solutions. by using contour only plot of functions can be drawn. what do i do now????
  댓글 수: 8
HARSHA GYANANI
HARSHA GYANANI 2018년 6월 17일
I am using 2015,,,, can u please send me code of 2015a as i dont know how to convert this using bsxfun
Walter Roberson
Walter Roberson 2018년 6월 17일
Macosd = @(X) sort([ bsxfun(@plus, (-1800:360:1800).', acosd(X)); bsxfun(@minus, (-1800:360:1800).', acosd(X))]);

댓글을 달려면 로그인하십시오.

답변 (2개)

KSSV
KSSV 2018년 4월 11일
N = 100 ;
a = linspace(0,2*pi,N) ;
b = linspace(0,2*pi,N) ;
[X,Y] = meshgrid(a,b) ;
Z = 1-2*cos(X)+2*cos(Y) ;
surf(X,Y,Z)
hold on
contour(X,Y,Z,[0 0],'r')
  댓글 수: 5
Vivek Kumar
Vivek Kumar 2020년 3월 21일
bro please help me to plot a graph delta_lambda=h(1-cosX)/cm please help me
Walter Roberson
Walter Roberson 2020년 3월 21일
Vivek Kumar: you should open a new Question for that. In that Question, please indicate which variables are your independent variables, and what range of values you want, and what style of plot you want.

댓글을 달려면 로그인하십시오.


Torsten
Torsten 2018년 4월 13일
Derive b as a function of a, prescribe a range for a, calculate b and use "plot(a,b)".
Best wishes
Torsten.

카테고리

Help CenterFile 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!

Translated by