I want put test 3 sigma on time series by 800*1 dimension. I have this code, it return nothing.

2 visualizaciones (últimos 30 días)
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

Respuestas (1)

Karim
Karim el 21 de Jun. de 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

Categorías

Más información sobre Time Series en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by