Recitation Problems  for Matlab Week 1

Recitation Problems  for Matlab Week 1...

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

View Full Document Right Arrow Icon
Poojan Patel MATLAB 1/25/2012 Recitation Problems for Matlab Week 1 Problem #1 Practice exercises 2.3 1) >> 6/6+5 ans = 6 2) >> 2*6^2 ans = 72 3) >> (3+5)*2 ans = 16 4) >> 3+5*2 ans = 13 5) >> 4*3/2*8 ans = 48 6) >> 3-2/4+6^2 ans = 38.5000 7) >> 2^3^4 ans =
Background image of page 1

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

View Full DocumentRight Arrow Icon
Poojan Patel MATLAB 1/25/2012 4096 8) >> 2^(3^4) ans = 2.4179e+024 9) >> 3^5+2 ans = 245 10) >> 3^(5+2) ans = 2187 11) >> (5+3)/(9-1) ans = 1 12) >> 2^3-(4)/(5+3) ans = 7.5000 13) >> (5^(2+1))/(4-1) ans = 41.6667 14) >> 2*(10)/(3) ans = 6.6667 15) >> [5+6*(7/3)-2^2]/[(2/3)*(3/3*6)]
Background image of page 2
Poojan Patel MATLAB 1/25/2012 ans = 3.7500 Practice Exercises 2.4 1) >> a= [2.3 5.8 9] a = 2.3000 5.8000 9.0000 2) >> sin(a) ans = 0.7457 -0.4646 0.4121 3) >> a+3 ans = 5.3000 8.8000 12.0000 4) >> b= [5.2 3.14 2] b = 5.2000 3.1400 2.0000 5) >> a+b ans = 7.5000 8.9400 11.0000 6) >> a.*b ans = 11.9600 18.2120 18.0000 7) >> a.^2 ans =
Background image of page 3

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

View Full DocumentRight Arrow Icon
Poojan Patel MATLAB 1/25/2012 5.2900 33.6400 81.0000 8) >> c= [0 1 2 3 4 5 6 7 8 9 10] c = 0 1 2 3 4 5 6 7 8 9 10 9) >> c= [0 2 4 6 8 10] c = 0 2 4 6 8 10 10) >> linspace(10, 20, 6) ans = 10 12 14 16 18 20 11) >> logspace(1, 2, 5) ans = 10.0000 17.7828 31.6228 56.2341 100.0000 Problem #2 >> a= [1 2 4 5] a = 1 2 4 5 >> b= [5 4 2 1] b = 5 4 2 1 >> a+10 ans =
Background image of page 4
MATLAB 1/25/2012 11 12 14 15 >> a*10 ans = 10 20 40 50 >> a+b ans = 6 6 6 6 >> a.*b, ans = 5 8 8 5 >> a./b, ans = 0.2000 0.5000 2.0000 5.0000 >> a+1./b, ans = 1.2000 2.2500
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/17/2012 for the course 663 101 taught by Professor Girsch during the Spring '12 term at Rutgers.

Page1 / 16

Recitation Problems  for Matlab Week 1...

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

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