Defining multiple arrays at once?
Show older comments
I am writing a code which requires a few zero arrays of the same dimension for a summation process in a loop, and I was wondering if it is possible to define them all at once. For example, I want 3 vectors A to C
A=zeros(5,1);
B=zeros(5,1);
C=zeros(5,1);
How can this be replaced with one line (if possible)? Thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Variables 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!