필터 지우기
필터 지우기

Average of Wave from 10 waves in single graph

조회 수: 16 (최근 30일)
Lokeswara reddy pamulapate
Lokeswara reddy pamulapate 2019년 11월 20일
댓글: Star Strider 2020년 2월 19일
Hello Everyone,
I have a doubt concerning the average of the wave from a set of waves from sinlge dataset. I need to get a single average curve from all the curves from the figure. I am new to matlab and can not figure it out and have not been able Screenshot (6) .pngto do so for a long time. I need you to help and it would be great for me. Thanks in advance.
  댓글 수: 3
Jan
Jan 2019년 11월 20일
Please calm down. Posting a question twice will confuse the ones who want to help you and maybe waste their time, when they type an answer, which has been given already. Therefore I have cleaned up your identical former question.
You cannot expect the voluntary helpers to post an answer in some minutes. Mentioning, that the problem is "urgent" is counterproductive. See: https://www.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency
There is only one curve in the image, so asking for an average is not meaningful. I guess, you mean that te curve is almost periodic and you want an average period. Then please explain, what the inputs are. It is easier to suggest a matching code, if we do not guess tis detail.
Lokeswara reddy pamulapate
Lokeswara reddy pamulapate 2019년 11월 20일
I have the data attched to this. Actually it is the wave of radial artery bloop pressure wave. I want to take the average of all the data to get one average curve from those data.

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

채택된 답변

Star Strider
Star Strider 2019년 11월 20일
Try this:
D = load('P_191005_000.mat');
ap = D.b;
Ts = 1E-3; % Assume Sampling Interval
tv = linspace(0, 1, numel(ap))*Ts; % Create Time Vector
[pks, locs] = findpeaks(-ap, 'MinPeakDist',250, 'MinPeakHeight',-85 ); % Determine Peaks & Indices
figure(1)
plot(tv, ap)
hold on
plot(tv(locs), -pks, '+r')
hold off
grid
for k1 = 1:numel(locs)-1
apc{k1} = ap(locs(k1):locs(k1+1)); % Define Frames
tvc{k1} = tv(locs(k1):locs(k1+1));
len(k1) = numel(locs(k1):locs(k1+1));
end
enstrim = cellfun(@(x)x(1:min(len)), apc, 'Uni',0); % Trim Records To Shortest Length
ensavg = mean([enstrim{:}],2); % Ensemble Average
figure(2)
hold all
for k1 = 1:numel(apc)
plot(tvc{k1}-tvc{k1}(1), apc{k1}) % Plot Frames
end
plot(tv(1:numel(ensavg)), ensavg.', '-r', 'LineWidth',2)
hold off
grid
producing:
Average of Wave from 10 waves in single graph - 2019 11 20.png
  댓글 수: 31
Lokeswara reddy pamulapate
Lokeswara reddy pamulapate 2020년 2월 19일
Hi, the pulse pressure can be calculated but I need to calculate the Augmented pressure(Anacrotic notch). from these Aorta and femoral.
Star Strider
Star Strider 2020년 2월 19일
For each pulse, identify the dicrotic notch (that appears to define it), as a point in time using the derivative (or whatever technique you choose), then get the pressure at that point in time.

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

추가 답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 20일
편집: KALYAN ACHARJYA 2019년 11월 20일
Lets say wave are y1,y2,y3.....up to y10..assuming all are having in same x scale
aveg_data=(y1+y2+y3...+y10)/10;
plot(x,aveg_data)
  댓글 수: 5
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 20일
편집: KALYAN ACHARJYA 2019년 11월 20일
Can you share two sample data, so that I can test on it?
Lokeswara reddy pamulapate
Lokeswara reddy pamulapate 2019년 11월 20일
ya sure

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by