Random surface not smoothing :(

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

 Respuesta aceptada

Star Strider
Star Strider el 4 de Mayo de 2015

0 votos

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 comentarios

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 4 de Mayo de 2015

Comentada:

el 5 de Mayo de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by