dataA=[dataA; sum(data((​i,n):(i+2,​n)))]; ...the matlab is telling it is invalid syntax how to rectifyit?

 Accepted Answer

This is no valid Matlab code:
data((i,n):(i+2,n))
Maybe you mean:
data(i:i+2, n)
or
data(i,n):data(i+2,n)
The error message is not really matching. There is no missing parenthesis or bracket, but an invalid indexing operation.

More Answers (0)

Tags

Asked:

on 30 Jun 2018

Edited:

Jan
on 30 Jun 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!