You can write a MATLAB program to find the summation of numbers greater than 5 from 1 to 10 using a for loop as follows:
main.m167 chars10 lines
Explanation:
sum
and initialize it to 0.sum
variable.sum
.When you run this program, it will calculate the summation of all numbers greater than 5 from 1 to 10, which in this case is 6 + 7 + 8 + 9 + 10 = 40.
gistlibby LogSnag