convert complex matrix to 3D plot

9 ビュー (過去 30 日間)
fatin
fatin 2012 年 3 月 26 日
i have a complex matrix (480*640double) ,i cant plot it to 3D coz i had ??? Error using ==> mesh at 80 X, Y, Z, and C cannot be complex.
plzzzzz how to solve it?????

回答 (1 件)

Kye Taylor
Kye Taylor 2012 年 3 月 26 日
Create a domain
[X,Y] = meshgrid(linspace(-pi,pi));
Evaluate f(z) = log(z) for complex z. F is a complex matrix that represents the complex natural log over the imaginary plane
F = log(X+sqrt(-1)*Y);
Visualize all three components of F:
figure,surf(X,Y,abs(Z)),title('magnitude of F'),xlabel('real'),ylabel('complex')
figure,surf(X,Y,real(Z)),title('Real values of F'),xlabel('real'),ylabel('complex')
figure,surf(X,Y,imag(Z)),title('Complex values of F'),xlabel('real'),ylabel('complex')
  3 件のコメント
Walter Roberson
Walter Roberson 2012 年 3 月 26 日
Skip the F(z)=log(z); line: it was theoretical rather than actual code.
Dr. Deepak Kumar Rout
Dr. Deepak Kumar Rout 2014 年 1 月 21 日
Replace F = log(X+sqrt(-1)*Y) with Z = log(X+sqrt(-1)*Y);

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

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by