Hello!
I have recently made a script which generates a random surface, but I need it to be smooth like the picture shown and was wondering what I have done wrong. I've added it all below. Thankyou!
Regards, Steve

 채택된 답변

Star Strider
Star Strider 2015년 5월 4일

0 개 추천

To make it smooth, you need more points. The easiest way is to define them in your code from the outset, although you can interpolate them as well (with the interp2 function).
I would write it as:
N = 25;
z0 = rand(N);
x0 = linspace(1, 5, N);
y0 = linspace(1, 5, N);

댓글 수: 2

Steve
Steve 2015년 5월 5일
Nevermind I got it, thanks though!
Star Strider
Star Strider 2015년 5월 5일
My pleasure!
I guessed that since the figure showed ‘Interpolated Data’ and was obviously a MATLAB figure, it likely had the code as well.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2015년 5월 4일

댓글:

2015년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by