How can i mark the points in a surface that have a certain value?
9 views (last 30 days)
Show older comments
Hi all,
I am carrying out a project in which I have to find a stationary configuration, which sums up into solving a non linear sysyem of equations of sinusoidal functions where the functions (which have to be equal to 0) are:
2*cos(x)*(8*sin(x)+3*sin(y))-9*sin(x)=0 2*cos(y)*(3*sin(x)+2*sin(y))-3*sin(y)=0
The main thing is that I want to plot both equations in the whole domain (0X2pi,0X2pi) so I can show all the possible solutions (although I will focus on the first cuadrant solutions)
To plot the firts function i use
ezsurf('2*cos(x)*(8*sin(x)+3*sin(y))-9*sin(x)',[0,2*pi],[0,2*pi],100)
There is any way I can mark in the surface, all the 0 values (i.e. solution points?)
Thank you very much for your time.
0 Comments
Accepted Answer
Chad Greene
on 8 Jan 2015
You have only plotted one data point that actually equals zero. I've labeled it with yellow text. To plot the contours at z=0, extract the x,y,z data from ezsurf:
h = ezsurf('2*cos(x)*(8*sin(x)+3*sin(y))-9*sin(x)',[0,2*pi],[0,2*pi],100);
shading interp
hold on
x = get(h,'xdata') ;
y = get(h,'ydata') ;
z = get(h,'zdata') ;
ind = z==0;
plot3(x(ind),y(ind),0,'yp')
text(x(ind),y(ind),'Z = 0','fontweight','bold','color','y')
contour(x,y,z,[0 0],'magenta','linewidth',4)
2 Comments
Image Analyst
on 8 Jan 2015
If it was really helpful, you can give him reputation points by both "Voting" for his answer and "Accepting" it.
More Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!