01:198:107 Lecture 10: More Vectors

58 views4 pages

Document Summary

For each possible place from first to last if found, set foundat to place. Problem: put as many words on a line as will fit. Line of words, one space after each. Assume each character is the same width. Number of characters that fit on a line is given as second argument. Return string with just the words that fit. One thing is totally inside another or else totally outside - never half in, half out. The outer thing controls whether/when/how often you do the inner thing. If and when you do the inner thing, the inner thing controls what is done. A vector can be thought of as a bunch of variables tied together. Each variable in the bunch has a 2-part name. E. g. , to print out the numbers in a vector, one per line: E. g. , to print out the numbers in a vector backwards (last first), one per line: E. g. , to print out every other number for j=1:2:length(scores)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents