Average alarm. When the average of the certain values in every 5 seconds goes ABOVE a selected threshold it says 'warning'
how do I do this in matlab?
thanks

1 Kommentar

Sara Meireles
Sara Meireles am 14 Mär. 2019
load('matlab.mat')
figure
plot(matlab.Time,y)
title('Instant alarm')
hold on
y=average(time:5000+time);
for time=1:length(matlab.Time)
if y>=23
disp=('Warning, temperature too high!');
else
disp=('Normal temperature!');
end
end

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 14 Mär. 2019

Kommentiert:

am 14 Mär. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by