MATLAB: Can someone give an example of a for loop for this problem?: Find the sum of 30 numbers that increments by 3. The starting number is 4. Thanks!

for loophomeworkMATLAB

Just a simple for loop please. Nothing too complicated. Thank you again.

Best Answer

x = sum(4:3:(4+3*(30-1)))