Está en la página 1de 2

DESIGN OF A LEAD CONTROLLER USING MATLAB (SAMPLE ASSIGNMENT)

For any Help with Design of a lead controller Assignment upload your Homework Assignment by clicking at Submit Your Assignment button or you can email it to info@matlabassignmentexperts.com .Totalk to our Online Design of Lead Controller Tutors you can call at +1 5208371215 or use our Live Chat option. Lead and Lag in Moving Average
This sample assignment depicts the meaning of Lead and Lag- When we replace the value of a point with the mean of it and the next point;we get Lead and when we replace the value of a point with the mean of it and the previous point we get Lag.
% compute general moving average (ie simple, linear, etc) % build weighting vectors i = 1:lag; wa(i) = (lag - i + 1).^alpha./sum([1:lag].^alpha); i = 1:lead; wb(i) = (lead - i + 1) .^alpha/sum([1:lead].^alpha); % build moving average vectors by filtering asset through weights a = filter(wa,1,asset); b = filter(wb,1,asset); If you call: [Short,Long]= movavg(A,20,20,1); You get exaclty the same averages, I guess they tried to give emphasis to the fact that one is long run and the other is short run. Anyway, the movavg implements the weighted moving average (linear and exponential): Linear weights

Exponential weights

Oleg

También podría gustarte