This is for Matlab
Assignment: Create a Matlab function called mysimplesum which takes four arguments in the form mysimplesum(a,b,c,n). Here, a, b, and c are real numbers and n is a positive integer. The Matlab function should calculate the sum of a+b+c using two nested for loops and should return the final result.
Here are some samples of input and output for you to test your code. When you submit your code, the inputs will be different.
Input:
mysimplesum(1,2,3,4)
Output:
39
Input:
mysimplesum(3.4,1.3,2.5,25)
Output:
848.4000
Input:
mysimplesum(-5,-0.5,1.31,30)
Output: