How to generate a user-defined pulse input from excel at simulink stateflow
3 views (last 30 days)
Show older comments
Hi there,
I'm using stateflow in the simulink to do some modeling work. Basically, I wanna use some pulse signal to trigger the event in certain conditions. Followings are some simple model I developed.
![1.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/204707/1.png)
![2.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/204708/2.png)
I wonder how can I generate a pulse based on the input of excel file, for example the figure below:
![3.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/204709/3.png)
Thanks in advance,
Feng
0 Comments
Answers (2)
Mundrathi Venugopal
on 19 Feb 2019
You can take a signal builder block and import the excel file into the signal builder from its options.
Your pulse input to be specified must be represented in excel as follows.
e.g. time column followed by number of data columns(i.e, number of signals) in one sheet (i.e, one group in signal builder)
time value
0 0
2 0
2 1
8 1
8 0
10 0
i.e, you specified a pulse from time 2 ~8 and elsewhere it is 0.
We can generate this pulse signal from Chart using temporal instructions also if We wanted to.
0 Comments
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!