필터 지우기
필터 지우기

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 CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by