I'm trying to create a 3d plot to show the amplitude of adding 3 sinusoids of varying phase. The three axes would be: time, frequency and magnitude. I'm just not sure how I can convert what I have into something that the function 3dplot can use. New to this, thanks!
clear;
clc;
inc = 100;
i = 1;
i2 = 1;
for t = 0:(2.413E-9)/inc:2.413E-9 %time range to view signals
for f = 56E9:(64E9-56E9)/inc:64E9 %frequencies from 56ghz - 64ghz
w = 2*pi*f;
wave1 = 0.5*sin(w.*t + (0.25*2));%sinusoids of varying distances, arbitrary amplitude
wave2 = 0.5*sin(w.*t);
wave3 = 0.5*sin(w.*t - (0.25*2));
mag = wave1 + wave2 + wave3;%combining waves
combined(i,i2,i) = mag;
%f,time,magnitude
i = i + 1;%changing frequency index
end
i = 1;
i2 = i2 + 1;%changing time index
end
EDIT: Thanks everyone, I think I have what I was looking for.