How come signal is logged with dimension 1x1x50 instead of 1x50?
1 view (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Fangjun Jiang
on 30 Apr 2015
Edited: Fangjun Jiang
on 30 Apr 2015
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.
0 Comments
See Also
Categories
Find more on Analyze Simulation Results in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!