Hi. I want plot Matrix to surf 3d graph on left picture, but I plot show on right picture. How to fix or code me for plot graph on left picture?
#Thank you.
My code : code

6 commentaires

Jan
Jan le 20 Juil 2017
Please post the code directly on not a link to a strange download portal. I did not understand, what your code does so far. Does it draw tge picture in the middle? What is the pictuire of the right side?
Wittaya Sata
Wittaya Sata le 21 Juil 2017
code and new picture
Walter Roberson
Walter Roberson le 21 Juil 2017
Part of this appears to be an aspect ratio (or zlim) matter.
However, notice that the one on the left has positive values on Z, whereas the one on the right has negative values on Z. This makes a difference in the colormap use.
Wittaya Sata
Wittaya Sata le 25 Juil 2017
I want the Z axis to look like a curve on the left picture. How to make it. Thank
If you want to get rid of the minus do:
zlim([-40 0]) % change limits, following walters remark
% now we take care about the minus
zticklabels(num2cell(-zticks)); % This creates new z-labels
Note if you update the zlims, you need to update the labels as well, because labels are just stickers that we put onto the z axis and they do not change when the axis changes.
Wittaya Sata
Wittaya Sata le 30 Juil 2017
U___U

Connectez-vous pour commenter.

 Réponse acceptée

dbmn
dbmn le 21 Juil 2017

0 votes

This should help you get started. I just added some lines to your code to make it look more like the old one
hdl = surf(B);
shading interp
xlabel('row')
ylabel('column')
% added stuff
colormap(jet) % old colormap
colormap(flipud(colormap)) % invert colormap (following Walters Remark)
hdl.EdgeColor = 'k' % black lines

3 commentaires

Wittaya Sata
Wittaya Sata le 23 Juil 2017
thank you sir. But I want the Z axis to look like a curve on the left picture. How to make it. _________ thank sir.
Walter Roberson
Walter Roberson le 23 Juil 2017
zlim([0 40]) or possibly zlim([-40 0])
Wittaya Sata
Wittaya Sata le 24 Juil 2017
thank you for x y z lim

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Discrete Data Plots dans Centre d'aide et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by