フィルターのクリア

How to create matrices from a meshgrid function

5 ビュー (過去 30 日間)
jgillis16
jgillis16 2015 年 6 月 23 日
コメント済み: jgillis16 2015 年 6 月 23 日
'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(:).'

採用された回答

Azzi Abdelmalek
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(:))
  3 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2015 年 6 月 23 日
What is C?
jgillis16
jgillis16 2015 年 6 月 23 日
C = accumarray([A+1, B+1], 1);

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by