When I log Signals in Simulink, I obtain a structure named 'logsout'. If the signal is a bus which contains signals with space in their name I can not access it from the workspace. When I log a Bus signal, I try to access its values in the MATLAB workspace by using the following command: logsout.VeryBig.Big Bus I receive the following error message: ??? logsout.VeryBig.Big Bus Error: Unexpected MATLAB expression. I would like to know a way to access this signal.
Kshitij Singh answered .
2025-11-20
To access logged data that have spaces in their names, use the following syntax:
logsout.VeryBig.('Big Bus')
If the Bus signal contains many levels of signals, the following error is generated:
logsout.VeryBig.('Big Bus').('bus with space')
??? Error using ==> subsref Invalid field name component.
To workaround this issue, please assign the subfield to a new variable as in the following example:
B=logsout.VeryBig.('Big Bus')
B.('bus with space')