I have created a simple Simulink Model which adds two signals:
The code to control this model is the following:
clear X Y Result
data=ones(1,5);
X=timeseries(data);
Y=timeseries(data);
output = sim('model_test','StopTime',stop_time);
Result = output.get('Res');
Obviously, I wish to get the following result, a matrix containing [2 2 2 2 2]. However, my result looks like this:
Result is a 1x1x27 double and not a 1x5 double as hoped for. Do you know what I have to change? Is my code wrong or do I have to change settings in the simulink model? Thank you in advance!