필터 지우기
필터 지우기

How to find the waveform average from multiple waveforms?

조회 수: 11 (최근 30일)
Jefferson Noble Antony
Jefferson Noble Antony 2020년 9월 10일
댓글: Ameer Hamza 2020년 9월 10일
I have plotted a wavefrom using excel file(i have shown it below). I have 7 other similar graphs like this. I need to find the waveform average of the this 8 graphs. The length of these graphs also different.
  댓글 수: 3
Jefferson Noble Antony
Jefferson Noble Antony 2020년 9월 10일
No, they are not in same length and they are in separate excel files if plotted they'll give similar graph. Sry, Im not allowed to share the file.
Ameer Hamza
Ameer Hamza 2020년 9월 10일
Do they have the same range on the x-axis?

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

답변 (1개)

Xavier
Xavier 2020년 9월 10일
Potentially something like this
data1 = randperm(randi([10 20]))'; %readmatrix('dataset1.csv');
data2 = randperm(randi([10 20]))'; %readmatrix('dataset2.csv');
data3 = randperm(randi([10 20]))'; %readmatrix('dataset3.csv');
data4 = randperm(randi([10 20]))'; %readmatrix('dataset4.csv');
data5 = randperm(randi([10 20]))'; %readmatrix('dataset5.csv');
data6 = randperm(randi([10 20]))'; %readmatrix('dataset6.csv');
data7 = randperm(randi([10 20]))'; %readmatrix('dataset7.csv');
max_num_datapoints = max([numel(data1),...
numel(data2),...
numel(data3),...
numel(data4),...
numel(data5),...
numel(data6),...
numel(data7)]);
alldata = zeros(max_num_datapoints, 7);
alldata(1:numel(data1), 1) = data1;
alldata(1:numel(data2), 2) = data2;
alldata(1:numel(data3), 3) = data3;
alldata(1:numel(data4), 4) = data4;
alldata(1:numel(data5), 5) = data5;
alldata(1:numel(data6), 6) = data6;
alldata(1:numel(data7), 7) = data7;
avgd = sum(alldata', "omitnan")' ./ (2-sum(isnan(alldata)')');

카테고리

Help CenterFile Exchange에서 Graphics Object Identification에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by