convert complex matrix to 3D plot

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일

1 개 추천

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

fatin
fatin 2012년 3월 26일
a=imread('example.bmp','bmp');
>> b=ifft2(a);
>> c=fftshift(b);
>> [X,Y] = meshgrid(linspace(-pi,pi));
>> F = log(X+sqrt(-1)*Y);
>> F(z)=log(z);
??? Undefined function or variable 'z'.
i get this error ,i replaced the (z) in ur prog. with the (c) in mine but couldnt hav a result 2... thank u 4 ur time but hope u can help me more with it...
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);

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2012년 3월 26일

댓글:

2014년 1월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by