How can I extract data from XY Graph in Simulink?
2 views (last 30 days)
Show older comments
Dear friends,
I have a XY Graph element in my circuit and I am wondering how can I extract data from XY Graph? I mean each point of X from a specific Y as a table or any output data.
With kind regards, Hamed
2 Comments
Answers (1)
Azzi Abdelmalek
on 4 Aug 2013
Your XY graph has two input, just use a to workspace block to get your two signal x and y
2 Comments
Hamed
on 5 Aug 2013
Thank you very much for your answer. I have to questions related to your answer.
1.Is there any possiblity to have the answers without considering the time? 2.Is it possible to extract the data resulted from workspace element directly to MS-Excel file?
Thank you again for your help Kind regards, Hamed
Kaustubha Govind
on 5 Aug 2013
Hamed:
- Not sure what you mean by "without considering time" - the input and output signals to your model are varying w.r.t. time - if you choose to ignore the time, then you can. However, in general, simulations are time-based.
- You can use the StopFcn callback to write MATLAB code to perform any operation you like at the end of every simulation. In your case, the MATLAB code could be written to use xlswrite to write the desired data into an Excel file.
See Also
Categories
Find more on Sources in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!