MATLAB: How to change the input parameters of a MATLAB function block over a range of 1 to 1000

How do I change the input parameters of a MATLAB function block over a range of 1 to 1000?

Best Answer

You could use the "From Workspace" block to achieve your workflow. This will allow you to define a matrix with first column defining time and second column defining the variable value at the corresponding time.
Additionally, within the "From Workspace" block, remove the check mark in "Interpolate Data" and set "Holding Final Value" for "Form output data after final value".
Here is the documentation link the details the usage for the "From Workspace" block for reference: