- refactored
This commit is contained in:
Executable
+36
@@ -0,0 +1,36 @@
|
||||
% Magnitude Estimation von x
|
||||
% Schätzung des mittleren Betrages von x
|
||||
% mit kombinierter Anstiegs- und Abfallzeit trf
|
||||
% ---------------------------------------------
|
||||
%
|
||||
% Aufruf:
|
||||
% function [mx,mxf] = mx(x,trf,mxi)
|
||||
%
|
||||
% Parameter:
|
||||
% x : Eingangsvektor
|
||||
% trf : Zeitkonstante Anstiegs- und Abfallzeit
|
||||
% mxi : Initial Condition Anfangsbetrag von x
|
||||
%
|
||||
% Rückgabewerte:
|
||||
% mx : Ausgang mittlerer Betrag von x
|
||||
% mxf : Endbetrag von x
|
||||
|
||||
% -------------------------------------------------------------------------
|
||||
% Datum : 26.07.2001
|
||||
% Autor : Jens Ahrensfeld
|
||||
% Thema : Diplomarbeit
|
||||
% Datei : mx.m
|
||||
% Benötigte Dateien: filter, lge, abs
|
||||
%
|
||||
% -------------------------------------------------------------------------
|
||||
function [mx,mxf] = mx(x,trf,mxi)
|
||||
|
||||
N = lge(x);
|
||||
x(1) = x(1) + mxi*(1/trf-1);
|
||||
%x = abs(x);
|
||||
a = [1,-(1-trf)];
|
||||
mx = filter(trf,a,x);
|
||||
mxf = mx(N);
|
||||
|
||||
% -------------------------------------------------------------------------
|
||||
% Ende mx.m
|
||||
Reference in New Issue
Block a user