Reputation: 1958
a = 0;
b = 0;
c = 0;
Can I do this in one statement without using an array/vecor?
Upvotes: 3
Views: 3510
Reputation: 4685
I would try using the deal
function.
http://www.mathworks.com/help/matlab/ref/deal.html
[a,b,c] = deal(0,0,0);
There are other ways, but this is a good function to learn.
Upvotes: 9