MATLAB Merge 3 FFT Spectrum Graphs in MATLAB - Step-by-Step Guide

AI Thread Summary
To merge three FFT spectrum graphs into one figure, start by opening a new figure in your programming environment. Use the "figure" command to create an empty figure window. Access the Figure Palette to create three 3D axes for your graphs. Right-click on each axis to add your data for the three spectra, labeled as Z1, Z2, and Z3. To automate this process in code, utilize the subplot command to divide the figure into three sections, allowing for the sequential display of each graph. This method ensures a clear and organized presentation of all three FFT spectra in a single visual output.
RK10
Messages
3
Reaction score
0
How can we merge 3 FFT spectrum graphs in one as shown in the picture?
AND THANK YOU

I have written the codes for the 3 spectrums but need to join them as shown.
 

Attachments

  • 3D.PNG
    3D.PNG
    18.7 KB · Views: 688
Physics news on Phys.org
Okay here are the steps you need to follow:


Let's say you have the following data with you.

X,Y : Value for x,y axes for all the graphs.
Z1 : Value of Z for the first graph
Z2 : Value of Z for the second graph
Z3 : Value of Z for the third graph

Steps:

1. Open an empty figure by typing "figure" in the command window.
2. Click on the window like structure given above in the tool bar just below "Help" (you must have used to type title of the figure and all).


3. Now when you open it, then either you can see "Figure Palette", if yes then proceed to next 4, otherwise click on the Desktop, and select Figure Palette from there (same as you do to see command window, workspace etc).

4. There you can see "New Subplots", select 3D Axes as many as you want.
5. Now once you got three 3D axes on the figure, you can add data to them by right clicking the axes.
6. Hope it works.

By the way nice figures :)
 
To implement this in code you'd use the subplot command,

figure;
subplot(1,3,1) % splits the figure into three side-by-side figures and selects the first
[put code to generate image 1 here]
subplot(1,3,2)
[image 2]
subplot(1,3,3)
[image 3]
 

Similar threads

Replies
8
Views
2K
Replies
5
Views
2K
Replies
1
Views
2K
Replies
5
Views
3K
Replies
3
Views
2K
Replies
3
Views
3K
Replies
1
Views
2K
Back
Top