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

• MATLAB
• member 428835
In summary, the conversation discusses plotting a 3D image using a complex-valued matrix and a real-valued matrix. The code involves creating triplets of coordinates and values to use for the plot.
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))

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)

## 1. How do I plot a 3D image from a matrix for a complex domain?

To plot a 3D image from a matrix for a complex domain, you will need to use a specialized software or programming language such as MATLAB or Python. These programs have built-in functions and tools for creating 3D plots from matrices. You will also need to have a good understanding of the mathematical concepts behind complex numbers and how they are represented in a matrix form.

## 2. What are the steps involved in plotting a 3D image from a matrix for a complex domain?

The first step is to define your complex matrix, which will represent your data points in the complex plane. Next, you will need to choose a suitable 3D plot type, such as a surface plot or a scatter plot. Then, you can use the appropriate function or tool in your chosen software to create the plot. Finally, you may need to adjust the appearance and formatting of the plot to make it more visually appealing and informative.

## 3. Can I plot a 3D image from a matrix for a complex domain in Microsoft Excel?

Unfortunately, Microsoft Excel does not have the capability to plot 3D images from matrices with complex values. It is designed primarily for basic data analysis and visualization, and does not have the advanced functions and tools needed for complex number operations. You will need to use a more specialized program or language for this task.

## 4. How can I add a color scale to my 3D plot of a complex matrix?

Adding a color scale, also known as a color bar, to your 3D plot of a complex matrix can help to better visualize the data. Most software programs have an option to add a color bar to 3D plots, which allows you to map the complex values to different colors. This can make it easier to identify different regions or patterns in the data.

## 5. Is it possible to plot a 3D image from a matrix for a complex domain in real-time?

Yes, it is possible to plot a 3D image from a matrix for a complex domain in real-time using certain programming languages and libraries. This allows for dynamic visualization of changing complex data, which can be useful in various scientific and engineering applications. However, it may require more advanced programming skills and computing power to achieve real-time plotting.

• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
862
• MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
399
• MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
310
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K