필터 지우기
필터 지우기

How can i detecting and marking wheezes on a plot?

조회 수: 3 (최근 30일)
furkan akhan
furkan akhan 2020년 12월 15일
댓글: Star Strider 2020년 12월 15일
>> soundData=structWheeze(2,1).SoundData;
>> plot(soundData)
>> flow=structWheeze(2,1).Flow;
>> figure(1),hold on,plot(flow,'r')
>> legend('soundData','flow')
>> soundsc(soundData,9600)
>> grid on
>> figure(2),specgram(soundData)
>> colorbar;
WS_new_array=structWheeze(2,1).Properties.WS_new
WS_new_array =
1063
17565
21359
36899
55411
70245
90088
102232
114892
119569
123811
>> WE_new_array=structWheeze(2,1).Properties.WE_new
WE_new_array =
7952
19385
26744
45315
61905
77760
94105
111387
117453
122765
126968
>> for i=1:length(WS_new_array)
startindex=WS_new_array(i)
endindex=WE_new_array()
endindex=WE_new_array(i);
plot(soundData(startindex:endindex))
pause
end
These are my code.SoundData array: A channel sound (sampling rate 9600) of the patient. Flow array: breath flow signal. WS_new_array and WE_new_array will give you start and end indexes of wheezes. When I zoom your plotted sound, wheezes will be seen between these indexes. Finally, I need to make a markup on the time-plot graph. These are what I need to do. But i could not marking on the time-plot part. What I want from you to what i should add to this code or help me where I went wrong.

답변 (1개)

Star Strider
Star Strider 2020년 12월 15일
I have no idea what you are asking.
Taking a guess, to add annotations to your plot, the easiest way is to use the text function.
  댓글 수: 2
furkan akhan
furkan akhan 2020년 12월 15일
in short i am asking how can i marking wheezes on a plot?
Star Strider
Star Strider 2020년 12월 15일
Since you already have the indices, you can either draw horizontal lines through them, or use the text function to annotate them, or both.
Try this:
WS_new_array = [ 1063
17565
21359
36899
55411
70245
90088
102232
114892
119569
123811];
WE_new_array = [ 7952
19385
26744
45315
61905
77760
94105
111387
117453
122765
126968];
figure
plot([WS_new_array, WE_new_array].', ones(2, size(WS_new_array,1))*5, '-r', 'LineWidth',2)
grid
xlabel('Index')
.

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by