courseproject_test

courseproject_test - function courseproject_test f %In this...

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

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.

Unformatted text preview: function courseproject_test f %In this step I import the file containing the data (data.txt), assigning %the time vector to the variable time, and the concentraion vector to the %variable c. Next I convert the time from minutes to seconds. I compute %the length of the c vector and then divide by 101 (the number of required %points after thinning), this gives me the interval that i need to extract %the new data. The tnew and cnew values are globalized so that they can %later be used in the cost function. % global tnew cnew g data = load('data.txt'); d time = data(:,1); t time = time.*60; t c = data(:,2); c L = length(c); L interval = L/101; i %-------------------------------------------------------------------------- %Thinning Step %Sets up 2 for loops, one that takes every 35th (the interval value) data %point in c and assigns it to cnew (the new, thinned concentration %vector). The second for loop does the same thing to the time vector % r = 1; r for i = 1:round(interval):L cnew(r,1) = c(i,1); r = r + 1; end e r = 1; r for i = 1:round(interval):L tnew(r,1) = time(i,1); r = r + 1; end e %--------------------------------------------------------------------------...
View Full Document

This note was uploaded on 09/21/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

Page1 / 4

courseproject_test - function courseproject_test f %In this...

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

View Full Document
Ask a homework question - tutors are online