MATLAB代做  | MATLAB代写  | MATLAB有偿编程
首 页
当前位置:MATLAB代做|MATLAB代写|MATLAB有偿编程matlab源码参考源码matlab方面
基于matlab编程预测自回归的马尔可夫转换模型源码程序        [↓跳到下载地址]
官方主页:源码共享网站:www.buycode.cn

联系方式:客服QQ:1747812398 买代码源码软件站,欢迎咨询

运行环境:Win9X/2000/XP/2003/

源码语言:简体中文

源码类型:源码程序 - 参考源码 - matlab方面

推荐星级:

更新时间:2016-04-05 22:38:20

源码简介

% Example Script for MS_AR_Simul.m and MS_AR_Fit.m (run it in the same directory - just press f5)

% This script will first simulate a 2 states MS model with some pre defined parameters
% using MS_AR_Sim.m and then fit the model with MS_AR_Fit.m.

% You can change the coefficients for your own flavor

% You'll see that fmincon() is doing a pretty good job estimating the MS
% model (cheers for it!)

addpath('m_Files');

clear;

nr=1000;                % Number of observations in simulation
advOpt.distrib='t';     % Distribution to use ('Normal' or 't' - default = 'Normal')
advOpt.std_method=1;    % Method for standard error calculation

Coeff.p=[.9 .2 ; ...    % Transition matrix (this also defines the value of k)
         .1 .8 ];       % Each collum of it should sum to 1
                        % Notes that the transition matrix output for fitting may
                        % not be exactly equal to this one since the
                        % the fit function doesn't know which states is
                        % 1 2, it just tries to find them and
                        % separate. This means that the pii (prob os staying at state i) can be
                        % deslocated through the collums, but it
                        % should respect the structure at Coeff.p
        
Coeff.C(1,1)= .01;   % Setting up the mean constant at State 1
Coeff.C(1,2)=-.01;   % Setting up the mean constant at State 2

Coeff.v(1,1)= 3;   % Setting up the student distribution parameter at State 1
Coeff.v(1,2)= 5;   % Setting up the student distribution parameter at State 2

Coeff.AR(:,1)=[ .2  .1 -.1];   % Setting up the AR param at State 1 (you can increase/decrease it as wanted)
Coeff.AR(:,2)=[-.5 -.1  .1];   % Setting up the AR param at State 2 (you can increase/decrease it as wanted)  

Coeff.Std(1,1)=.02;  % Setting up the standard deviavion at State 1
Coeff.Std(1,2)=.05;  % Setting up the standard deviavion at State 2

ar=size(Coeff.AR,1);    % Number of lags in autoregressive component
k=length(Coeff.p);      % Number of states simulated (according to Coeff.p)

[Simul_Out]=MS_AR_Sim(nr,Coeff,k,advOpt.distrib); % Simulating the series

x=Simul_Out.Sim_x; 

figure(2);  % Making sure matlab plots both figures
[Spec_Output]=MS_AR_Fit(x,ar,k,advOpt);    % Fitting to get parameters

rmpath('m_Files');


提 示:本站所有源码只提供浏览,需要定制的朋友可以联系在线客服!
注意:价格根据项目的难易程度来定价格业务咨询

基于matlab编程预测自回归的马尔可夫转换模型源码程序 --下载地址

注意:为避免不必要的误会,本站项目里的源码只公开部分需要的联系在线客服

本站长期招聘程序代写高手,欢迎加入华南地区matlab团队

想创业却没有经验的人

无论你是否有过网上开店的经验,都可以随时联系在线客服,建立自己独立的网站
想开网店却不知道如何入手

淘宝创业成本低而且风险小,如果想开淘宝店的朋友可以联系在线客服。
想兼职创业,却不擅长交际与服务的人

在家创业月入5000元。网站程序+百套群发工具+网赚资料+域名+空间+本站终身代理资格,这样你网赚的条件全具备了。每天3小时管理、推广、收钱。
缺乏能快速赢利型产品的人

导入多种最新流行营销软件+网赚教程,让入驻者轻松加盟、复制有效成交技巧、快速赚钱。

源码评论评论内容只代表网友观点,与本站立场无关!

   评论摘要(共 0 条,得分 0 分,平均 0 分) 查看完整评论

浏览说明

* 本站所有源码全部公开,随时随地浏览!
* MATLAB软件如用于商业用途,请购买正版!
* 如果您发现下载链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含破解及注册码均是由网上搜集,若侵犯了你的版权利益,敬请来信通知我们!
Copyright © 2008-2014 www.buycode.cn. All Rights Reserved.
页面执行时间:250.00000 毫秒