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

1 回表示 (過去 30 日間)
tara es
tara es 2022 年 6 月 21 日
編集済み: tara es 2022 年 6 月 21 日
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

回答 (1 件)

Karim
Karim 2022 年 6 月 21 日
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

カテゴリ

Help Center および File ExchangeHypothesis Tests についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by