how to extract data in the structure to individual vector variable?

2 次查看(过去 30 天)
i have 1x1 data obtained from time vs signal graph. i want to separate time and signal and assign them into different varable.

回答(1 个)

Moe_2015
Moe_2015 2016-2-18
编辑:Moe_2015 2016-2-18
This should be pretty straight forward. You can do this:
%Assuming a structure name of Structure
Time=Structure.time;
Signal=Structure.signal;
EDIT: I realized that this might be some data you're getting from simulink as a structure with time from the way you phrased it. So it would be something like this:
Time=simout.time;
Signal=simout.signals.values;
  3 个评论
Moe_2015
Moe_2015 2016-2-18
编辑:Moe_2015 2016-2-18
You are welcome. If this helped you with your problem please accept the answer for the benefit of others.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by