How to plot these traces after a fixed interval?

Hellow everyone,
I have attaced a figure have many traces (vertical) at different incident angles (from 1 to 30). On vertical axis there is time. I want to plot few traces at selected angles, say 5, 15, 25. I mean just three traces at selected angles instead off all angles from 1 - 30.
The code is here:
figure,
wiggle(data);
xlabel('Incident angle');
ylabel('Time'); axis([1 30, 500, 1880]);
The wiggle is a function I am calling here. It is like wiggle(data,time,angle). How I can fix it to get desired traces?

 Respuesta aceptada

Mathieu NOE
Mathieu NOE el 6 de Abr. de 2021
hello
this is it :
C = randn(2000,30);
data = filter(ones(1,100),1,C);
ind = [5, 15, 25]; % your angles
figure(1),
wiggle(data(:,ind), 'I');
xlabel('Incident angle');
ylabel('Time');
set(gca,'XTick',(1:length(ind)),'XTickLabel',num2str(ind(:)))
ylim([500 1880]);

3 comentarios

Nisar Ahmed
Nisar Ahmed el 8 de Abr. de 2021
Hi, thanks,
It seems you have limitized the data as well. I want to keep data 1 -30 angles but want to plot wiggle say just at 10 degree.
The original data are left untouched
you can have your display for only one angle value by choosing the ind values , can be only 10 if you wish
ind = [10]; % your angles
figure(1),
wiggle(data(:,ind), 'I');
xlabel('Incident angle');
ylabel('Time');
set(gca,'XTick',(1:length(ind)),'XTickLabel',num2str(ind(:)))
ylim([500 1880]);
Nisar Ahmed
Nisar Ahmed el 17 de Jun. de 2021
Thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Preguntada:

el 6 de Abr. de 2021

Comentada:

el 17 de Jun. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by