plot a matrix in 3D
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi there,
If I have a square matrix H=randi(N,N)+1i*randi(N,N); how can I plot the maginitude of this matrix H in 3D?
댓글 수: 0
답변 (1개)
John D'Errico
2023년 2월 24일
편집: John D'Errico
2023년 2월 24일
DID YOU TRY IT? Why not?
So, given some arbitrary complex matrix, how do you compute the magnitude? ABS does that. How you you plot the matrix? Use surf. Or you could use pcolor. Or you could use mesh. Or use surfc. I'm sure there are some other options I could think of too.
N = 10;
H = rand(N,N) + i*rand(10,10);
MagH = abs(H);
surf(MagH)
shading interp
댓글 수: 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!