Recitation 11 Presentation

# Recitation 11 Presentation - 14:440:127 Introduction to...

This preview shows pages 1–8. Sign up to view the full content.

14:440:127 Introduction to Computers for Engineers Recitation 11 Lecturer: Blase E. Ur Recitation Instructor: Bo Jin Recitation Instructor: Cyrus Gerami Recitation Instructor: Vishnu Vijayakumar Recitation Instructor: Wen Yueh

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

View Full Document
14:440:127 Recitation 8 Recursion Recursive function y = myfactorial(x) if(x==1) y = 1; else Non Recursive function y = myfactorial(x) y = 1; for z = x:-1:1 y = y*z; Rutgers University School of Engineering y = x * myfactorial(x-1); end end
14:440:127 Recitation 8 Fibonacci Sequence Recursive function y = FibonacciN(n) if(n==1 | n==2) y = 1; else Non Recursive function y = FibonacciN(n) f(1) = 1; f(2) = 1; for z = 3:n Rutgers University School of Engineering y = FibonacciN(n-1) + FibonacciN(n-2); end f(z) = f(z-1) + f(z-2); end y = f(n);

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

View Full Document
14:440:127 Recitation 8 Sparse Matrices a=zeros(100); a(15,26)=15; %80000 bytes b=sparse(a); %416 bytes a = rand(100); %80000 bytes Rutgers University School of Engineering b = sparse(a); %120404 bytes
14:440:127 Recitation 8 Structs (Structures) person(1).iq = 40; person(1).name = 'Soulja Boy'; person(1).home = 'Bad Radio'; person(1).pet = 'Fido Tell ''Em';

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

View Full Document

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.
• Fall '09
• blase
• Orders of magnitude, Units of information, Byte, Power of two, Rutgers University School, Rutgers University School of Engineering

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern