This preview shows page 1. Sign up to view the full content.
Unformatted text preview: for loop that calculates 20! (20 factorial). You may not use the factorial( ) function. “No Computer” Question 2: Imagine that we had a new data type called int7 , storing 7 bit (signed) integers. What’s the largest integer that int7 could store correctly? “No Computer” Question 3: Write a function called myrandom that generates three random numbers between 0.8 and 0.85, and returns (as its output) a vector containing those 3 numbers. Note that the function doesn’t take any input arguments. “No Computer” Question 4: Given the following Matlab code, draw a grid that represents the image that’s displayed. For each pixel in the grid, write in what color it will be, i.e. as an example, for a different set of code, you might have: Yellow Black White Black Orange Pink Here is the code for you to use: A(:,:,1) = zeros(3); A(:,:,2) = ones(3); A(:,:,3) = zeros(3); A(1:3,1,2) = zeros(3,1) A(1,1,1) = 0.9; imagesc(A)...
View Full Document
This note was uploaded on 02/29/2012 for the course 440 127 taught by Professor Blase during the Fall '09 term at Rutgers.
- Fall '09