WienerforMainIdentification

# WienerforMainIdentification - Main Regression Simulation...

This preview shows pages 1–2. Sign up to view the full content.

% Main Regression Simulation %% check for the sg value of K matrix and kernel_matrix functions. they are %% changed but now they are the same. clear all u=1*normrnd(0,2,1,700); % A white gaussian input sequence u with length %700 0 mean and standard deviation 2 %u=8*rand(1,700)-4; ut=normrnd(0,2,1,200); %input for testing. e=normrnd(0,.2,1,700); % A white gaussian with zero mean and standart de %viation .2 with length 700. it is error term %e = zeros(1,700); % this is added after all. actually it should have % been done before a = [2.789 -4.591 5.229 -4.392 2.553 -.8679] ; % ai s b = [1 .8 .3 .4] ; N=200; r=7; m=3; sg = 1/sqrt(2); % bi s % now we will get the input output data. The last 200 datapoints will be % used for training [h,tt] = impz(b,[1 -a]); %filter impulse response us = [0 u(1:end-1)]; % past values of "u" v = sinc(u ).*u.^2; y = conv(h,v)'; figure(2) ; plot(y(1:700)); title('y for little code') %% solve linear equation % construct Kernel matrix . The last two hundred data points will be used. xtrain = u(201:400);u=u+e; for i=1:200 % K is omega matrix for j=1:200 K(i,j) = exp(-((u(1,i+200)-u(1,j+200))^2)/(1*sg^2)); %itis oki end end % Construct Yf. Again the last two hundred data points will be used .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

### Page1 / 3

WienerforMainIdentification - Main Regression Simulation...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online