Plotting a Surf of my waveform
Mostrar comentarios más antiguos
Hi, my waveform is
sampling = 1 / (1*10^6); t = 0: sampling :0.05 ; %Sample Rate
f = (30 : 1 : 35)* (10^3); %Frequency Range
for a = 1:length(f) -1
y(a,:) = cos (2*pi .* f(a) .* t)
end
plot (t, sum(y)) % my waveform of 5 frequencies combined
xlim ([0 3] *10^-3) ; ylim([-6 6])
I am trying to get a 3d plot of my waveform.
So I think it should be
surf(t, new_value, y)
How do I declare the new_value to get my 3dimensional shape and how to properly scale the grid to X limits in the 2d plot? Totally stumped and getting blank figures appearing Ive also tried the below to get the grid dimensions equal to my sampling
[x,y] = meshgrid(0:sampling:0.05)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Waveform Generation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
