14-440-127 Recitation 11 Presentation

14-440-127 Recitation 11 Presentation - 14:440:127...

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

View Full Document Right Arrow Icon
14:440:127 Introduction to Computers for Engineers Recitation 11 Lecturer: Blase E. Ur Recitation Instructor: Tianming Li Recitation Instructor: Ke Xu Recitation Instructor: Brian Viezbicke Recitation Instructor: Mingliang Wang
Background image of page 1

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

View Full Document Right Arrow Icon
Rutgers University SOE 14:440:127 Recitation 11 Linear Interpolation • interp1(x,y,newx) – x = existing x points – y = existing y points – newx = points you want tyo estimate – Lines go through each point x=1:5; y = [2 6 6.2 7.4 10]; newx = 1:0.1:5; newy = interp1(x,y,newx); plot(x,y,'O',newx,newy)
Background image of page 2
Rutgers University SOE 14:440:127 Recitation 11 Splines x=1:5; y = [2 6 6.2 7.4 10]; newx = 1:0.1:5; newy = spline(x,y,newx); plot(x,y,'O',newx,newy)
Background image of page 3

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

View Full Document Right Arrow Icon
Rutgers University SOE 14:440:127 Recitation 11 Polyfit and Polyval x = 1:0.1:10; %%% Create noise from -0.5 to 0.5. Add to each y point. noise = 3*rand(1,length(x))-1.5; y = 5*x+3 + noise; % y=5x+3, but with noise added coeffs = polyfit(x,y,1); yfit = polyval(coeffs,x); plot(x,y,'X',x,yfit)
Background image of page 4
Rutgers University SOE 14:440:127 Recitation 11
Background image of page 5

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

View Full Document Right Arrow Icon
Rutgers University SOE 14:440:127 Recitation 11 Recursion • Functions call themselves
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 13

14-440-127 Recitation 11 Presentation - 14:440:127...

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

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