3
a = 0;
b = 0;
c = 0;

Can I do this in one statement without using an array/vecor?

1 Answers1

9

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.

macduff
  • 4,655
  • 18
  • 29