Normalizing and exporting impulse responses

Hi all,
I am a relatively new matlab user facing the following problem which I hope you can help me with.
  • Given: structural impulse responses (SIRs) based on a simple VAR; structure has three elements (irfinf, irfmed, irfsup). Saved in 'filenameofIR.mat'
  • Goal(s)
1. Export data to excel such that I have all three elements (median, upper and lower confidence bound) in one worksheet.
2. Normalize impulse responses For instance, I have an exogenous variable as the first variable in the VAR and government spending as the second variable. I wish to normalize the impulse responses such that the max impact of the first variable on government spending is 1 (to facilitate comparison...).
I attach a sample of the sort of VAR output I am taking as my starting point.
  • Approach so far For 1.
data=load('filenameofIR.mat');
fn=fieldnames(data); %get all variable names
IR=data.(fn{1}); %get the first element of the structure, this is irfinf
xlswrite('desiredxlsfilenname',IR1(:,:,1)) %export e.g. the first impulse response (i.e. with the exogenous variable as impulse); but this is only the median, I would like to have all three together.
For 2., I have not found any useful guidance at all /:
I would greatly appreciate your help!
Best,
Lukas

댓글 수: 4

Lukas Freund
Lukas Freund 2017년 8월 10일
Apologies for bringing this up again - does nobody have any ideas?
To normalize:
data = 1:10;
normal_data = (data - min(data)) ./ (max(data) - min(data));
Lukas Freund
Lukas Freund 2017년 8월 17일
Thank you, José-Luis. However, given this normalization, surely the entire shape of the impulse response is distorted, as I only want to normalize the functions relative to one max...
José-Luis
José-Luis 2017년 8월 18일
I don't get it.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

질문:

2017년 8월 4일

댓글:

2017년 8월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by