Pre3Review

Pre3Review - CS 100M Prelim 3 Review Problems Solutions on...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 100M: Prelim 3 Review Problems Solutions on Website Monday. 1. AllInterval function B = AllInterval(x,a,b) % x is a length-n vector. % B is assigned the value of 1 (true) if every x-value is in the % interval [a,b]. % B is assigned the value of 0 (false) if at least one of the x-values % is not in the interval [a,b]. % Your implementation should make effective use of a while-loop. 2. Transpose % Refer to lecture 18 and the function TheDigits: C = TheDigits; % C is a length 10 cell array with the property that C{k} is % a 7-by-5 bitmap of the digit k (regarding 0 as the "tenth" digit.) % Produce a length 10 cell array D which houses 5-by-7 bitmaps % of the "transposed" arrays. Thus, since % % C{1} looks like % 00100 % 01100 % 00100 % 00100 % 00100 % 00100 % 01110 % then D{1} should look like % % 0000000 % 0100001 % 1111111 % 0000001 % 0000000 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
3. TotalValue % Refer to the Cost-Inventory application in Lecture 17 % Complete the following function. .. function T = TotalValue(Inv,Cost)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Pre3Review - CS 100M Prelim 3 Review Problems Solutions on...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online