plot signal - adjust axis

30 visualizaciones (últimos 30 días)
Ido
Ido el 15 de Abr. de 2024 a las 7:21
Comentada: Chunru el 15 de Abr. de 2024 a las 10:08
i have signal between |f|<100 Hz
and i need to present it the range of |f|<125 Hz
MY PROBLEM is that i want to have a continuity between the output signal to the outrange 100<f<125 to be a solid line
in this range the output signal doesnt exist so it just cutted with no bound to x axis
IN SIMPLE WORDS
to add contiuetinity (yellow line to the x axis)
thanks for help!

Respuestas (1)

Chunru
Chunru el 15 de Abr. de 2024 a las 7:58
% Test data
f = (-100:1:100);
p = randn(size(f)); p = p-min(p)+1;
% extropolate data
fe = [-125 f 125];
pe = interp1(fe, [0 p 0], fe, 'linear', 'extrap');
plot (fe, pe)
axis tight
grid on
  2 comentarios
Ido
Ido el 15 de Abr. de 2024 a las 9:17
thanks for answering
but my signal is maded from few rand cos(wt) so the boundaries should be more smoothly like 1/1-x
i used meshgrid so it didnt considered the area bettween 100<|f|<125
theres another way to solve it ?
Chunru
Chunru el 15 de Abr. de 2024 a las 10:08
Can you share your data and code?

Iniciar sesión para comentar.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by