This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: c) A=rand(1,1000); tic for i=1:1000 A(i)=A(i)^2 end toc %time about 6.0s A=rand(1,1000); tic for i=1:1000 A(i)=A(i)^2; end A toc %time about 0.027s d) tic A=sin(.3); B=rand(1,1000); for i=1:1000 C=B+sin(.3); end toc %time about 0.0036s tic for i=1:1000 D=A+B; end toc %time about 0.0029s #3 *For each of the 3 colors there are 256 possible “brightness” values. Excluding pure white and black there are then 256^3-2= 16777214...
View Full Document
This note was uploaded on 04/28/2008 for the course GEEN 1300 taught by Professor Degrazia,j during the Spring '08 term at Colorado.
- Spring '08