How to get workspace variable data

3 visualizaciones (últimos 30 días)
nkumar
nkumar el 1 de Nov. de 2015
Respondida: Sebastian Castro el 2 de Nov. de 2015
I have a model which consist of 3 To workspace blocks(say x,y,z),I need to automatically save To workspace data into excel sheet,I tried by
simOut1 = sim('mymodel','ReturnWorkspaceOutputs', 'on');
where p=simOut1.who ,gives
p =
'x'
'y'
'z'
now please tell how to get values of x,y,z so i can write these data to excel sheet.

Respuestas (1)

Sebastian Castro
Sebastian Castro el 2 de Nov. de 2015
I think you want to do
>> xSeries = get(simout,'x');
>> t = xSeries.Time;
>> x = xSeries.Data;
- Sebastian

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by