To declare a variable tt
in MATLAB with a size of [1 100], you can use the following syntax:
main.m53 chars2 lines
This creates a variable tt
as a 1-by-100 array with all elements initialized to zero. You can then assign new values to the elements of tt
using normal MATLAB indexing syntax. For example:
main.m126 chars3 lines
You can also create a row vector of ones instead of zeros if that is more appropriate for your use case.
gistlibby LogSnag