How do I perform this operation

15 Ansichten (letzte 30 Tage)
Blair Hall
Blair Hall am 2 Okt. 2017
Bearbeitet: Walter Roberson am 2 Okt. 2017
function weekendBoxOffice = GetWeekendEarnings(movieBoxOffice)
% movieBoxOffice : 7 day box office sales in millions, starting with Sunday
% Assign Sunday, Friday, and Saturday box office
% earnings to row array weekendBoxOffice
weekendBoxOffice = 0;
end
  6 Kommentare
Blair Hall
Blair Hall am 2 Okt. 2017
Bearbeitet: Walter Roberson am 2 Okt. 2017
I have tried. I just reset it after I couldn't figure out how to do it. Here is the rest of the question.
Integer indexing array: Weekend box office
The row array movieBoxOffice stores the amount of money a movie makes (in millions of $) for the 7 days of a week, starting with Sunday. Write a statement that constructs a row array weekendBoxOffice having the values for Sunday, Friday, and Saturday.
Ex: If movieBoxOffice is [5.6, 3.5, 1.1, 1.5, 0.8, 1.2, 1.9], then weekendBoxOffice is [5.6, 1.2, 1.9].
I originally tried weekendBoxOffice = [1, 6, 7]. The answer was weekendBoxOffice = movieBoxOffice([1,6,7])
Jan
Jan am 2 Okt. 2017
@Blair: Did you read and understand the suggestions of Rik and me?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by