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 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](/WebImages/19/if-the-sales-data-for-each-day-one-week-is-represented-by-th-1038540-1761539169-0.webp)