examples.m
来自「麻省理工学院的人工智能工具箱,很珍贵,希望对大家有用!」· M 代码 · 共 24 行
M
24 行
Example1.Network={'GSN'};
Example1.Stations={'Spain.stn'};
Example1.Variable={'Precip'};
date={'1-Jan-1998','31-Dec-1998'};
[data,Example1]=loadStations(Example1,'dates',date,'ascfile',1);
data=data(:,1); % Selecting the first stataion: San Sebastian.
%umbral=[0,0.5,10,20,inf];
umbral=[0,0.5,inf];
% Ocurrence of precipitation (discrete variable) Markov process.
disc=weatherGen(data,umbral,0,10*size(data,1),'markov');
figure;
plot(disc(1:365,1))
% Precipitation amount (continuous variable)
[disc,cont]=weatherGen(data,umbral,1,10*size(data,1),'wg');
plot(disc(1:365,1)) % Symbolic (discrete)
figure
subplot(2,1,1);
plot(data(1:end,1)) % Original
subplot(2,1,2)
plot(cont(1:size(data,1),1)) % Simulated
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?