intialise a matrix with matlab

i need to initialise a matrix but i don't know the dimension of the matrix there is any way to do it ?

 Accepted Answer

YourMatrix = [];
That will define the matrix as existing, with size 0 by 0. Sometimes that is good enough to work with. Other times you will need to know the exact size; it depends what your code does with the matrix.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!