I am trying to run the following funtion with input u
function output = statespaceEqn(u)
S = coder.load('matrix.mat');
S.x = S.A*S.x+ S.B*u;
output = S.C*S.x+ S.D*u;
I used coder.laod to load my variables 'A' 'B' 'C' 'D' 'x' from my mat file
I defined the variable x with zeros(321,1), but now I want the variable x to be updated with the new value once I run my function.
Could anyone help me to figure this out.