Hi,
The functionality of plotting two signals against each other under the ‘powergui’ simulation is not provided by any built-in function. Although, you can achieve the desired result using MATLAB scripting as a workaround. This method involves logging the signals of interest during simulation and then plotting them against each other after the simulation has completed. You may follow the steps given below:
- Ensure that the signals you want to plot against each other are being logged. In Simulink, you can use the ‘To Workspace’ block or the ‘Signal Logging’ feature to save your signals to the MATLAB workspace. Make sure both signals are logged at the same sample rate.
- Run your simulation.
- After the simulation completes, the signals will be available in the MATLAB workspace. You can then use MATLAB commands to plot these signals against each other.
xData = simOut.get('vOut').signals.values;
yData = simOut.get('iOut').signals.values;
minLength = min(length(xData), length(yData));
xData = xData(1:minLength);
yData = yData(1:minLength);
This script assumes you have used the Simulink logging feature to log your signals. If you used ‘To Workspace’ blocks, your signals would be directly in the workspace with the variable names you specified, and you can modify the script accordingly.
For more information on the process of ‘Signal Logging’ and the ‘plot’ function you may refer to this documentation given below:
Hope this helps!