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

i have 1x1 data obtained from time vs signal graph. i want to separate time and signal and assign them into different varable.

댓글 수: 2

Which routine did you call to obtain your data?
i don't know how to approach the problem

댓글을 달려면 로그인하십시오.

답변 (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.
if you wanted to extract more than 1 value how would you do that ?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

댓글:

2017년 10월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by