- #1
sara_87
- 763
- 0
Homework Statement
I want to type in MATLAB form, the following:
[tex]a=3\sum^{i-1}_{j=1}p(t_i,t_j)y(t_j)[/tex]
Homework Equations
The Attempt at a Solution
for i=1:n
t(i+1)=3*i
for j=1:i-1
a=3*p(t(i),t(j))*y(t(j))
end
end
Im getting the error:
? Attempted to access p(1,0); index must be a positive integer or logical.
how can i fix this?