How can I obtain the data from the scope for a waveform

1 回表示 (過去 30 日間)
Shivakumar
Shivakumar 2014 年 2 月 28 日
コメント済み: Mischa Kim 2014 年 3 月 11 日
Hi, I need data from the scope at a certain time. The waveform obtained is sinusodial. I've connected "To simulink" from where I want to get the data. I need to get the value of the waveform at time 4.85. I think this is one of the basic questions. I am not so sure of syntax of the command. Please help.
  4 件のコメント
Mischa Kim
Mischa Kim 2014 年 3 月 7 日
編集済み: Mischa Kim 2014 年 3 月 7 日
I have to concur with John, I believe I did provide an answer. One which you even got to work. I believe so especially because I am confident in your ability to check out your simout1 object, identify its time vector component and adapt the syntax I showed you accordingly.
I am sure you did not mean to, but you might come across as one of those constantly dissatisfied users that eventually are flagged (figuratively) in the contributors community.
Shivakumar
Shivakumar 2014 年 3 月 7 日
Kim, Please don't take me wrong. I flagged it because I want to make the question active and to get the answer. I don't have any dissatisfaction or complaints on your given answer. There are no other wrong intentions, Kim. I thank you for taking time to answer my question. If you go throw my comments, you will understand my problem of not getting the required solution.

サインインしてコメントする。

採用された回答

Mischa Kim
Mischa Kim 2014 年 3 月 1 日
編集済み: Mischa Kim 2014 年 3 月 1 日
One option would be to add a Digital Clock block as shown below and set the sampling time to 4.85. This way this time stamp is automatically added to your time vector that is saved in the workspace.
In MATLAB you can then simply search for the data point at t=4.85, e.g.,
hold on
plot(tout,simout(:,2))
plot(tout(tout==4.85), simout(tout==4.85,2),'rs') % for the above model
  22 件のコメント
Shivakumar
Shivakumar 2014 年 3 月 11 日
I thank you Kim for your effort and time. This command helped me to get the answer.
val=simout.signals.values(97001)
I thank you very much. :)
Mischa Kim
Mischa Kim 2014 年 3 月 11 日
Excellent. Would you mind formally accepting the answer?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by