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.

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 30 Apr. 2015
Bearbeitet: Fangjun Jiang am 30 Apr. 2015

0 Stimmen

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.

Kategorien

Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange

Produkte

Gefragt:

am 15 Apr. 2015

Bearbeitet:

am 30 Apr. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by