Thx. S Function is kinda complicated. What I want to do is actually quite simple.
In simulink, I have a matrix in workspace. I am trying to make a block so that it will output only one data out of the matrix according to the x,y location.
For example, my matrix is [1 2; 3 4]. When the input x=1, y=2, i want the block to output "4".
My plan was to use matlab function block that take the matrix and x,y as input. Is there any other workaround in simulink?
Thanks in advance!