How come signal is logged with dimension 1x1x50 instead of 1x50?

How can I log a signal with dimension 1x50 instead of 1x1x50? I have several constants with sample times of 0.01 that are converted to int32 and then passed through a switch. I have a test point placed at the signal after the switch. The simulink model runs with the correct output; however, the logged signal has dimension 1x1x50 instead of 1x50.

Answers (1)

You must have that output signal resolved to a signal object, like Simulink.Signal or mpt.Signal. a=Simulink.Signal If you specify a.Dimensions=[1 1], Simulink logs the simulation data as 1x1x50. 50 is the number of samples logged. If you specify a.Dimensions=1, Simulink will log the simulation data as 50x1. That is probably what you need.

Categories

Find more on Simulink in Help Center and File Exchange

Products

Asked:

on 15 Apr 2015

Edited:

on 30 Apr 2015

Community Treasure Hunt

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

Start Hunting!