Hi,
To plot the excel data using "From Workspace" and "Scope" blocks, please refer to the following steps:
- Assuming the Excel data is structured with one column for time and another for signal values, you can use the following script to read the data from Excel file:
data = readtable('exampledata.xlsx');
simulationData = struct('time', time, 'signals', struct('values', signal, 'dimensions', 1));
assignin('base', 'simulationData', simulationData);
- Open Simulink and drag the 'From Workspace' block.
- Double-click on the block and set the Variable name to simulationData.
- Drag a 'Scope' block and connect its input to the 'From Workspace' block to plot the data.
- Press Run in Simulink to start the simulation and click on the 'Scope' block to view the plot.
I hope this helps you to plot the data!