How to plot general solution of a trigonometric function???
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
Walter Roberson
2018-6-17
Macosd = @(X) sort([ bsxfun(@plus, (-1800:360:1800).', acosd(X)); bsxfun(@minus, (-1800:360:1800).', acosd(X))]);
回答(2 个)
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 个评论
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
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

