Tuesday, 20 August 2013

how o increment an array element in matlab?

how o increment an array element in matlab?

If A is an array of zeros of length 5 in matlab and I increment it's 3rd
element by 1 like shown below
A=zeros(1,5);
A[3]++;
It gives me an error, I want the output to be
A=
0 0 1 0 0
Thanks in advance for your time and help

No comments:

Post a Comment