資源簡(jiǎn)介
對(duì)數(shù)據(jù)進(jìn)行活動(dòng)窗口均值處理,根據(jù)其均值進(jìn)行數(shù)據(jù)分類,具有時(shí)間連貫性。matlab代碼
代碼片段和文件信息
%——————————
%——————————時(shí)間序列分段PAA算法程序————————————
clear;
clc;
%——————————————參數(shù)輸入————————————%
A=input(‘Please?input?the?traffic?date?like?[6:00?6:30?···?]\n?A=‘);??%按照時(shí)間順序輸入交通流數(shù)據(jù)
[a?A_longth]=size(A);%采集交通流數(shù)據(jù)組數(shù)
fprintf(‘The?longth?of?the?input?is:%5.4g\n‘A_longth);%輸出交通流數(shù)據(jù)組數(shù)
fprintf(‘Attention?win_width>slide_steps\n‘);
M=input(‘Please?input?the?width?and?the?slide?step?of?the?slide?window\n?[win_width?slide_steps]=‘);%輸入滑動(dòng)窗口大小及滑動(dòng)步長(zhǎng)
%——————————————參數(shù)處理————————————————%
win_width=M(1);%窗口大小
slide_steps=M(2);%滑動(dòng)步長(zhǎng)
評(píng)論
共有 條評(píng)論