How can I extract data from XY Graph in Simulink?

2 views (last 30 days)
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

Answers (1)

Azzi Abdelmalek
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
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
Kaustubha Govind on 5 Aug 2013
Hamed:
  1. 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.
  2. 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.

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!