Could I use Simulink to generate signal to test Matlab code?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Chen Kevin
am 19 Apr. 2020
Kommentiert: Ameer Hamza
am 19 Apr. 2020
Hi all,
I am fresh to use matlab, so I want to know if I can use Simulink to generate signal for me to test my analysis tools programmed by matlab recently.
Because it is quite time consuming for me to make a demanding signal with matlab...
In this mean time of COVID-19 caused home-office situation, no instruments (e.g. function generator or real experiment) besides me so I'm considering maybe Simulink can do a little bit replacement of them.
2 Kommentare
Ameer Hamza
am 19 Apr. 2020
What type of signal do you want to make in Simulink? Is it described by a mathematical formula, differential equations?
Akzeptierte Antwort
Ameer Hamza
am 19 Apr. 2020
The attached file (saved in R2020a) shows how to generate different types of signals in Simulink and export them to MATLAB's workspace. It uses 'To Workspace' blocks to send data from Simulink to MATLAB. You can plot these signals in MATLAB by using the 'out' struct given by the Simulink. For example,
plot(out.varAmpFreqSine)
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Test Execution finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!