I want put test 3 sigma on time series by 800*1 dimension. I have this code, it return nothing.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
clc; clear all; close all;
fid=xlsread('rohi.csv');
x = fid(:,2); res = [];
upperbond = mean(x) + 3*std(x);
lowerbond = mean(x) - 3*std(x);
for n= 1:length(x)
if x(n) <= upperbond & x(n) >= lowerbond;
res=[x n];
emp_prob(x)=1
else
emp_prob(x)=0
end
end
what is problem?
Thanks in advance
0 Kommentare
Antworten (1)
Karim
am 21 Jun. 2022
the error is because you intialize
lat = fid(:,2);
this means that 'lat' will be a vector with 1 column
next you ask for
lat(:,i)
or the i-th column, which will give an arror as soon as i becomes larger then 1
0 Kommentare
Siehe auch
Kategorien
Mehr zu Time Series finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!