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

  • Context: MATLAB 
  • Thread starter Thread starter RK10
  • Start date Start date
  • Tags Tags
    3d Matlab Modelling
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 5K views
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: 712
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]