14-440-127 Recitation 11 Presentation

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

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

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

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

View Full Document
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)
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)

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

View Full Document
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)
Rutgers University SOE 14:440:127 Recitation 11

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

View Full Document
Rutgers University SOE 14:440:127 Recitation 11 Recursion • Functions call themselves
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
Ask a homework question - tutors are online