0
votes

I want to apply a transfer function to each element of a 15x42 matrix in simulink. Is there an nice way to do it? My best idea so far is to us a cascade of subsystems, dividing the matrix in smaller pieces and eventually have a few tranfer function blocks in parallel. I think there must be a more elegant way of doing this...

Context: I want to perform temporal filtering on an image sequence using the following transfer function on each separate pixel: (a s + b)/(c s + 1) where a=0.04, b=0.1 and c = 0.04 are constants and s is the laplace parameter

1
mind telling us what a, s,b,c are? and have you looked as bsxfun()?The Minion
@The Minion: for a,b,c and s see edit. I need it in a simulink model and as far as I know there is no bsxfun in simulink.vipers36
but transfer function blocks can have matrix inputs?Robert Seifert
@thewaywewalk: Unfortunely, I get an "Error in port widths or dimensions" when connecting a multi channel signal to "Transfer fcn" or "LTI System" blockvipers36
Don't use the Transfer Function block (as it only allows scalar inputs), rather, create the transfer function yourself using Integrator, Sum and Gain blocks (which will allow you to feed the matrix directly into it, and filter each channel as if they are independent signals).Phil Goddard

1 Answers

0
votes

You can form a 3D array of the image sequence, where the third dimension is time, and apply

M = filter([a b], [c 1], X, [], 3);

where X is your sequence of matrices.