- First Order Differential Equation
- Solving Mathematical Equation
- MATLAB Simulink - Script
- MATLAB Simulink - Export Data
- MATLAB Simulink - For Loop
- MATLAB Simulink - Create Subsystem
- MATLAB Simulink - Function
- MATLAB Simulink - Sinewave
- MATLAB Simulink - Logic Gates Model
- Build Model & Apply If-else Logic
- MATLAB Simulink - Mathematical Library
- MATLAB Simulink - Adding Delay To Signals
- MATLAB Simulink - Signals Processing
- MATLAB Simulink - Build & Simulate Model
- MATLAB Simulink - Lines
- MATLAB Simulink - Blocks
- MATLAB Simulink - Starting Simulink
- MATLAB Simulink - Environment Setup
- MATLAB Simulink - Introduction
- MATLAB Simulink - Home
MATLAB Simulink Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MATLAB Simupnk - Export Data
In this chapter, we will learn how to use Simupnk output results inside MATLAB. Let us try a simple model of sine wave as shown below −
When we run the model, the scope displays the sine wave as shown below −
Now to get the data of the sine wave, go to the configuration properties and select logging tab.
Select the log data to workspace checkbox, as shown below −
Set the variable name of your choice. Here, we have given the name as swave and the save format as Array. Cpck on OK button and run the simulation again.
You should see the output in the workspace
Double cpck and it will show you the details of the swave variable which we saved earper.
Inside command prompt type out .swave and it will give you the output as shown below −
You can plot the sine wave using plot command as shown below −
The graph is shown as follows −
Advertisements