MATLAB: How to tell Simulink to use the time steps of the input to produce exactly the same number of output steps as input

simulinkstep size

System is SISO. Im looking for variable step discrete solver setting that guarantees solutions at every input time step. In the end I want to calculate the sum of squared errors. Thats why the vector lengths must agree. I want to avoid having to interpolate input to fixed step if possible.

Best Answer

In the "Data Import/Export" panel, Additional parameters, look for "Output options", select "Produce specified output only" and then specify the "Output times", which in your case, would be the same as the input time vector.