How can I access signals logged from Simulink which contains spaces in their name?

A
Armani_78 · Sep 18, 2020 · 2.5K views
Question
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.
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 24, 2026

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')
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!