フィルターのクリア

plot a matrix in 3D

2 ビュー (過去 30 日間)
mingcheng nie
mingcheng nie 2023 年 2 月 24 日
編集済み: John D'Errico 2023 年 2 月 24 日
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?

回答 (1 件)

John D'Errico
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

カテゴリ

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

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by