how to 3D grid plot with fine spacing

when i try to plot the following code the plot doesnt show anything: code:
h=10^-9;
N=40;
x=linspace(0,N*h,N);
y=linspace(0,N*h,N);
u=ones(N,N);
surf(x,y,u)
but when i change the grid to be less i.e. h=10^-5 then it would plot it perfectly what can i do about this please help

Réponses (1)

Sean de Wolski
Sean de Wolski le 26 Fév 2013
Your_stuff
axis tight %tighten the axes to the data.

2 commentaires

youu hooo
youu hooo le 26 Fév 2013
didnt work
Well it worked for me!
Run this:
h=10^-9;
N=40;
x=linspace(0,N*h,N);
y=linspace(0,N*h,N);
u=ones(N,N);
surf(x,y,u)
axis tight

Connectez-vous pour commenter.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Question posée :

le 26 Fév 2013

Community Treasure Hunt

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

Start Hunting!

Translated by