How to plot these traces after a fixed interval?

조회 수: 2 (최근 30일)
Nisar Ahmed
Nisar Ahmed 2021년 4월 6일
댓글: Nisar Ahmed 2021년 6월 17일
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?

채택된 답변

Mathieu NOE
Mathieu NOE 2021년 4월 6일
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
Mathieu NOE
Mathieu NOE 2021년 4월 8일
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 2021년 6월 17일
Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by