Code for Plotting Sphere function
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Atinesh Singh
el 4 de Sept. de 2016
Comentada: Atinesh Singh
el 5 de Sept. de 2016
Can anybody share the complete code for plotting sphere function
like this
in matlab
0 comentarios
Respuesta aceptada
John BG
el 5 de Sept. de 2016
Atinesh, 4 steps
1. define the [x y] grid:
x=[-10:1:10];y=[-10:1:10];
2. build all possible points, there are other ways but this is the most compact one
[X,Y]=meshgrid(x,y);
3. Calculate the function points
Z=X.^2+Y.^2;
4. 3D plot with surf
surf(Z)
Atesh,
if you find this answer useful would you please be so kind to mark my answer as Accepted Answer?
To any other reader, please if you find this answer of any help solving your question,
please click on the thumbs-up vote link,
thanks in advance
John BG
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!