How do I create a 2-D array with variable size columns?

14 views (last 30 days)
I'd like to create a 2-D array with variable size columns. I have n Bins each of which has a variable number of entries and each entry is composed of 3800 frequencies.
I know that zeros(n,m,3.8e3) where m is my maximum number of entries can hold all my information but I'd like to do this without having extra arrays.
I was thinking if there was a way to create a variable size structure then I could just create n arrays each with a different size and add them to my structure.
Thanks for any help.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 6 Jan 2016
You can use cell arrays
v={1:10 1:5 1:3}

More Answers (0)

Categories

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!