clear all; close all; sdate = qq(2016,1); edate = sdate + 10; rng = sdate:edate; rng2 = sdate-1:edate; %% take the model % read model file m = model('nk.model','linear=',true); % solve and find steady state m = solve(m); m = sstate(m); get(m,'sstate') %% simulate db = zerodb(m,sdate); db.eps_y(sdate) = 1; sdb = simulate(m,db,rng,'deviation', true, 'anticipate',false); s = dbextend(db,sdb); % plot IRFs figure; plot(rng2,[s.y s.pie s.i],'linewidth',2,'marker','o'); legend('y','\pi','i'); ylabel('% odchylka od ss') title('Poptavkovy sok'); grid on;