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

답변 (1개)

Sean de Wolski
Sean de Wolski 2013년 2월 26일

0 개 추천

Your_stuff
axis tight %tighten the axes to the data.

댓글 수: 2

youu hooo
youu hooo 2013년 2월 26일
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

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2013년 2월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by