Clear Filters
Clear Filters

Data Compression in Simulink (currently with a quadtree) / Variable-Size Matrix

1 view (last 30 days)
I need to compress some data I simulated in Simulink. Also, the result of the compression needs to be accessible in simulink (in the same programm, so during the simulation).
I managed to compress the data (a huge matrix) with a quadtree. The calculation of it is done in a matlab function block and the quadtree is saved in one 1xn Array. The matrix has a lot of areas with the same values, so the quadtree only needs a small percentage of the original storage space. Since the layout of the quadtree depends on the actual values in the matrix, the size is variable. Simulink can not deal with a variable-size matrix as the output of the matlab function.
So does anyone has another idea to compress the data or to deal with the variable-size array? It doesn't have to be a quadtree.

Accepted Answer

Harald
Harald on 7 Jul 2023
Edited: Harald on 7 Jul 2023
Hi,
Simulink supports variable size arrays as output of a MATLAB Function block. You need to click "Edit Data" in the upper left, select the output, expand "Advanced", and select the "Variable size" option.
You may also find this doc page helpful:
Best wishes,
Harald

More Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!