How to get workspace variable data

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.

回答(1 个)

I think you want to do
>> xSeries = get(simout,'x');
>> t = xSeries.Time;
>> x = xSeries.Data;
- Sebastian

类别

帮助中心File Exchange 中查找有关 Data Import from MATLAB 的更多信息

产品

标签

Community Treasure Hunt

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

Start Hunting!

Translated by