Lab11 - Riti Gupta/20249537 Section22/Lab11 1. a.)...

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

View Full Document Right Arrow Icon
Riti Gupta/20249537 Section22/Lab11 1. a.) X=[0:23]; Y=[809, 528, 499, 632, 1109, 3051, 4958, 4877, 4574, 4276, 4062, 4204, 4117, 4183, 4474, 4685, 4838, 4869, 4425, 3377, 2659, 2439, 1965, 1119]; X1=[0:(5/60):23]; Y11=interp1(X,Y,X1, 'nearest' ) Y12=interp1(X,Y,X1, 'linear' ) Y13=interp1(X,Y,X1, 'spline' ) plot(X,Y, 'go' ,X1,Y11,X1,Y12,X1,Y13) title( 'Interpolation of Traffic Data' ) legend( 'data' , 'nearest' , 'linear' , 'spline' ) xlabel( 'Time(in hours)' ) ylabel( 'Number of Vehicles' ) (did not include matrices because too much data) b.) X=[0:24]; Y=[809, 528, 499, 632, 1109, 3051, 4958, 4877, 4574, 4276, 4062, 4204, 4117, 4183, 4474, 4685, 4838, 4869, 4425, 3377, 2659, 2439, 1965, 1119, 809]; X1=[0:(5/60):28]; Y11=interp1(X,Y,X1, 'nearest' ) Y12=interp1(X,Y,X1, 'linear' ) Y13=interp1(X,Y,X1, 'spline' ) plot(X,Y, 'go' ,X1,Y11,X1,Y12,X1,Y13) title( 'Interpolation of Traffic Data' ) legend( 'data' , 'nearest' , 'linear' , 'spline' ) xlabel( 'Time(in hours)' ) ylabel( 'Number of Vehicles'
Background image of page 1

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

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

This note was uploaded on 12/01/2009 for the course ENGIN 7 taught by Professor Horowitz during the Spring '08 term at University of California, Berkeley.

Page1 / 4

Lab11 - Riti Gupta/20249537 Section22/Lab11 1. a.)...

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

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