MATLAB: Is it possible to extract separate variables for the logged signals in MATLAB workspace in Simulink 7.0 (R2007b)

loggingsignalsimulinkworkspace

A logged signal in a subsystem many levels below the root gets stored like this:
logsout.subsystem1.subsystem2.subsystem3.y
To avoid this I usually use "To Workspace" blocks and not signal logging.
Is there a way to avoid including the subsystem names hierarchy and just store it like this:
logsout.y

Best Answer

To extract signal logging objects from signal logs and write them into MATLAB workspace use the UNPACK method.
For example, for the case mentioned above, use
logsout.unpack('all');