Why will findpeaks not work when filtering is applied?

1 回表示 (過去 30 日間)
Richard Reees
Richard Reees 2019 年 4 月 17 日
編集済み: Richard Reees 2019 年 4 月 17 日
Good evening everyone,
I have been running a flume experiements within a uniform water level sequence over a period of time, due to the constraints on the equipment the implimentation of the appplies series haves to be done in small increments i.e. water level change every 4 seconds instead of 1. My problem is that this has created very small local maxima, which has interferred with the overall global. What I have managed to do is extract the majority peak pore pressures and the time this occurs using the findpeak levels (crest of the slope) to a cell array, however the local maxima have also been detected and extracted. So, to eliminate this I applied the filter (1-D digital) to the matrix and comparing the graphs of before and after, it appears that the data has been sufficently smoothened to remove the majority of the ammolous results. However, when I run the same code to extract the data it says:
"Unable to perform assignment because brace indexing is not supported for variables of this type."
I just simply do not understand why as as far as I can tell nothing has changed, but it clearly has.Attached is example data, time first column, sensors the remaining.
Could you please help?
A=Example; % Data unfiltered -Works
[~, y]=size(A);
for i=1:y
[a{i},m{i}]=findpeaks(A(:,i));
data{i}(:,1) = flume_a(m{i});
data{i}(:,2) = a{i}(:);1
end
%% This section applied filter - Doesn't work
windowSize = 6;
b = (1/windowSize)*ones(1,windowSize);
a = 1;
C= Example;
[~, y]=size(C);
A = filter(b,a,C);
for i=1:y
[a{i},m{i}]=findpeaks(A(:,i));
data{i}(:,1) = flume_a(m{i});
data{i}(:,2) = a{i}(:);1;
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by