Forum Discussion
Altera_Forum
Honored Contributor
17 years agoYou (sort of) explain what you want to achieve but don't really say what the problem is. Are you saying that you get an error when you execute the code you gave?
If so then it's because your brackets are wrong. MATLAB uses "(" and ")" for array indexing. e.g. r1 = x(i) + x(j)