Hi Mohammed,
The error you are encountering seems to be related to the dimensions or port widths of the signals in your Simulink model. The error message suggests that there is a mismatch between the dimensions of the output signal from the 'Add' block and the input signal to the 'Öffnungsverhalten3' block in your model.
Make sure that the dimensions of the signals connected to the 'Add' block and the 'Öffnungsverhalten3' block are compatible.
To obtain the time and pressure results for each loop iteration, you need to store the results in arrays or data structures.
% Initialize empty arrays before the loop, and then store the time and pressure values
% inside the loop for each iteration as shown below
timeResults = cell(1, 10);
pressureResults = cell(1, 10);
for i = 1:10
P = 0-i;
I = -1;
D = 0;
sim('Druckprop_Umwandlung_Funktion.slx');
drucksignal = out.logsout.getElement('out_druck');
timeResults{i} = drucksignal.Values.Time;
pressureResults{i} = drucksignal.Values.Data;
end
Hope this answers the question you had!