0

I need to store some vectors,but i don't kown how many vectors.I want to ask is there exits cell array with undefined size that means denamic cell arrays in Matlab?Or can i only predefine a very large cell array to meet my demand?

1 Answer 1

2

All arrays in matlab are 'dynamic' (i.e. resizeable)

>> a = [1,2,3]
a =
     1     2     3

>> a(7) = 7
a =
     1     2     3     0     0     0     7

Same with cell arrays:

>> b = {1,2,3}; b{7} = 7
b = 
    [1]    [2]    [3]    []    []    []    [7]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.