How do I find peak duration with the following scatterplot?
Afficher commentaires plus anciens
I have a simple data sample taken from freshwater stream data. I have time plotted on x-axis and turbidity (pollution) plotted on y-axis. All I need to do is calculate the duration of each peak with a turbidity above 55 units.
clear
clc
load Time_X.txt
load Turbid_Y.txt
x=Time_X;
y=Turbid_Y;
t=[x,y];
i=1;
a=0;
b=0;
while b==0
if t(i,2)>=0
if y(i)>=55
a=a+1;
% disp(y(i))
value(a)=y(i);
end
i=i+1;
end
if i==14513
b=1;
end
end
scatter(x,y,'.')
hold on
plot([0 31], [55 55])
xlim([0 31]);
ylim([0 190]);
if y>55
disp('y')
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Descriptive Statistics dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!