by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.0, Creation date: 2021-02-09, Last change: 2025-09-15
y=MGTsystemFIR([u0,bi,sh])
u0: | numer sequence describin a signal / function | |
bi: | [1 x n] Coefficients [b0 b1 b2 b3 .....bn-1] | |
sh: | if true; the progess is shown step by step |
y: | response of y "masked" with coefficients bi |
MGTsystemFIR([0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0],[0 0 1 1 1 1 0 0 ]/4); % Mean + Delay
This function, MGTsystemFIR, generates a system response for a transfer function that has only bi coefficients. It is part of the SG-Library and was introduced in SolidGeometry 5.0.
getfuncparams function:
u0 is set to a default sequence if not provided.bi is set to a default array [0.5, 0.5] if not provided.sh is set to false if not provided.y, u, and v with zeros, having the same size as u0.ai and bi using numel.MGTsystemIIR with parameters u0, ai, bi, and sh to compute the response y.nargout == 0):
bi is greater than 1, and print the amplification factor if true.MGTsystemIIR again with the same parameters.SGtitle to set the title of the plot.bi using PLplotdiscretetime and display the plot.implot.The function can be called as follows:
MGTsystemFIR([0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0],[0 0 1 1 1 1 0 0 ]/4);
This example demonstrates a mean and delay operation on the input sequence.
Algorithm explaination created using ChatGPT on 2025-08-19 08:12. (Please note: No guarantee for the correctness of this explanation)