How to create matrices from a meshgrid function
6 次查看(过去 30 天)
显示 更早的评论
'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(:).'
0 个评论
采纳的回答
Azzi Abdelmalek
2015-6-23
编辑:Azzi Abdelmalek
2015-6-23
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(:))
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!