Borrar filtros
Borrar filtros

How to create matrices from a meshgrid function

5 visualizaciones (últimos 30 días)
jgillis16
jgillis16 el 23 de Jun. de 2015
Comentada: jgillis16 el 23 de Jun. de 2015
'The scatter3 plot needs vectors, not matrices, but you can do that easily enough by using meshgrid to create the matrices and then creating vectors from them as RA(:), DEC(:) and A(:).'

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 23 de Jun. de 2015
Editada: Azzi Abdelmalek el 23 de Jun. de 2015
a=1:0.1:10
b=1:0.1:10
[A,B]=meshgrid(a,b)
C=sin(A).*cos(B) % Example
scatter3(A(:),B(:),C(:))
  3 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 23 de Jun. de 2015
What is C?
jgillis16
jgillis16 el 23 de Jun. de 2015
C = accumarray([A+1, B+1], 1);

Iniciar sesión para comentar.

Más respuestas (0)

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!

Translated by