Question:
M-FILES USING SUBPLOT AND SURFC COMMANDS IN MATLAB?
Henry
2009-10-04 11:47:04 UTC
Let f (x, y) = 2^2 + xy +y^4 . Write an M-file that uses subplot to generate a 1 x 2 array of plots with the following specifications.
a)The left plot should use SURFC to generate a plot of the graph of the expression z= f (x, y) and the contours over the following region defined by:
b) -–1 ≤ x ≤ 1 and –1 ≤ y ≤ 1 . Use a 25 by 25 grid. Display grid lines, labels on all axes, and a title that includes the formula for the function. (Use a multi-line title if necessary.)
b)The right plot should:
i) display the default contour plot of over the square [-1,1] by [-1,1] using a 25 by 25 grid, with labels on all contour lines.
ii) add five additional contours at levels between 0 and 0.5
iii) label the additional contours using clabel.
iv) include labels on the axes and a title
c) Does the function have any maximum or minimum values in the domain [-1,1] by [-1,1] ?
If so, use either the Data Cursor or the coordinate grid to estimate the x and y values at the maximum/minimum points. Specify these estimates in a comment line in your M-file.
Three answers:
2009-10-05 09:30:13 UTC
The site below gives you some examples for plotting in 2D and 3D. It does not solve your homework, but it helps you understand several basic concepts on Matlab plotting.



I suggest you give it a look...
morgado
2016-10-13 05:41:39 UTC
Matlab Surfc
Cheryl
2016-04-06 03:54:00 UTC
Olive Oil Is A Natural Moisturizer For Dry Hair To Get Rid Of Flaky Dandruff


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...