Question

Pg 11 of 11 Epoch names (Pre-3000 B.c., etc.) are stored in ochs, a 16x1 cell array. Complete the following FOR loop, designed to create a table body whose two columns are a)the epoch names and b) the total number of people counted in each epoch. For totals, use the values in your newly created third column of counts (as described in Prob. 23a. In addition, use the loop body to compute a running total of the number of people counted in each epoch. Be sure to properly initialize total. Apts) for k length (epochs) tri, 15st10dln, printf total end
0 0
Add a comment Improve this question Transcribed image text
Answer #1

total = 0; %initialization
for k = 1:length(epochs)
fprintf('%15s%10d\n', epochs{k,1}, counts{k,3})
total = total + count{k,3};
end

The above is the matlab code.

If you face any issues, do let me know the description for counts variable as mentioned in the solution of problem 23a. Hope this helps.

Add a comment
Know the answer?
Add Answer to:
Epoch names ("Pre-3000 B.C.", etc.) are stored in epochs, a 16 times 1 cell array. Complete...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT