Plotting a 3D image from a matrix for a complex domain

member 428835
Hi PF!

Each element of an ##n\times m## matrix is complex valued. In the following code, I call this "domain". There is also an ##n\times m## matrix that is real valued, below I call this "f". I'd like to plot a 3D image where the ##x-y## plane is the complex plain given by the coordinates "domain" who take a height f. Do you know how to do this?

Matlab:
RE_lam_end       = 30;                     
IM_lam_end       = 10;
RE_lam_start     = 0;                     
IM_lam_start     = 0;
RE_dlam          = 1;
IM_dlam          = 1;
RE_lam           = RE_lam_start:IM_dlam:RE_lam_end;
IM_lam           = IM_lam_start:RE_dlam:IM_lam_end;
domain              = RE_lam+1i*IM_lam';

f = rand(size(domain,1),size(domain,2))

I appreciate your time!
 
on Phys.org
How about making a Table to build up triplets {Re[domain[[i,j]]],Im[domain[[i,j]]],f[[i,j]]}, which you can then ListPlot3D?
 
DrClaude said:
How about making a Table to build up triplets {Re[domain[[i,j]]],Im[domain[[i,j]]],f[[i,j]]}, which you can then ListPlot3D?
Thanks for the response! I ended up using

Matlab:
surf(RE_lam,IM_lam,freq)
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K