Hi Davide,
By default 'Save data to workspace or file' is set to 'Single simulation output', so Simulink saves all the simulation outputs in a single 'Simulink.SimulationOutput' object. To access the data, you need to refer to the specific signals you're interested in by their names as fields of this object.
Below are possible steps you can try out to resolve the issue:
- First, ensure that the signals EM_n and EM_T are being logged. You can log signals by right-clicking on a signal in your Simulink model and selecting 'Log Selected Signals'. This action marks the signal for logging, and its data will be available in the simulation output.
- Assuming 'out' is the variable you have your simulation output saved to, you access logged signals like this:
EM_n_data = out.logsout.get('EM_n').Values;
EM_T_data = out.logsout.get('EM_T').Values;
3. Now you can use the 'scatter' function like below:
scatter(EM_n_data,EM_T_data,'filled','.','markeredgecolor',[1 0 0])
Hope it helps!