If the sales data for each day one week is represented by th

If the sales data for each day one week is represented by this vector [350 750 800 1250 1700 2000 200]. Write a code that calculates the total dollars in commission this salesperson would receive. Label that output of dollars as total.Upload your m-file.

Solution

close all
clear all
clc
sales = [350 750 800 1250 1700 2000 200];
sum = 0;
for i=1:length(sales)
    total(i)=sum+sales(i);
    sum = total(i);
end
total

 If the sales data for each day one week is represented by this vector [350 750 800 1250 1700 2000 200]. Write a code that calculates the total dollars in commi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site