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

2 visualizaciones (últimos 30 días)
i have 1x1 data obtained from time vs signal graph. i want to separate time and signal and assign them into different varable.

Respuestas (1)

Moe_2015
Moe_2015 el 18 de Feb. de 2016
Editada: Moe_2015 el 18 de Feb. de 2016
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 comentarios
Moe_2015
Moe_2015 el 18 de Feb. de 2016
Editada: Moe_2015 el 18 de Feb. de 2016
You are welcome. If this helped you with your problem please accept the answer for the benefit of others.
Jonathan Duncan
Jonathan Duncan el 6 de Oct. de 2017
if you wanted to extract more than 1 value how would you do that ?

Iniciar sesión para comentar.

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by