sara_87
Oct31-09, 07:39 AM
1. The problem statement, all variables and given/known data
i want to produce a vector t(i) where t(i)=i and i=1:10
2. Relevant equations
3. The attempt at a solution
for i=1:10
t(i)=i
end
this gives:
1,2,3,4,5,6,7,8,9,10,10
why is it giving me 11 elements? with two 10's?
i just want:
1,2,3,4,5,6,7,8,9,10
i want to produce a vector t(i) where t(i)=i and i=1:10
2. Relevant equations
3. The attempt at a solution
for i=1:10
t(i)=i
end
this gives:
1,2,3,4,5,6,7,8,9,10,10
why is it giving me 11 elements? with two 10's?
i just want:
1,2,3,4,5,6,7,8,9,10