Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Extrapolating exp data to zero

Subject: Extrapolating exp data to zero

From: Kelley

Date: 13 Aug, 2013 03:15:09

Message: 1 of 3

I have experimental data of reaction rates and their corresponding times, the only issue I'm having is my data begins at times of say 100 seconds, but I need to know the initial rate of reaction, aka corresponding y data (reaction rates) for x data (times) between 0 and 100. I need to somehow plot my data and then extrapolate a best fit line to zero. Any help would be greatly appreciated.

Subject: Extrapolating exp data to zero

From: Kevin Hellemans

Date: 13 Aug, 2013 07:33:18

Message: 2 of 3

"Kelley" wrote in message <kuc8bs$f7f$1@newscl01ah.mathworks.com>...
> I have experimental data of reaction rates and their corresponding times, the only issue I'm having is my data begins at times of say 100 seconds, but I need to know the initial rate of reaction, aka corresponding y data (reaction rates) for x data (times) between 0 and 100. I need to somehow plot my data and then extrapolate a best fit line to zero. Any help would be greatly appreciated.

You can create a fit object with the polyfit function, and evaluate it on any vector of your choosing by using the polyval function. Here's an example:

% Generate x and y data
xdata = [100:10:1000];
ydata = [300:30:3000] + rand(1,91)*10 - 5; % Add Noise

% Plot original data in scatterplot
scatter(xdata,ydata)
hold on

% Fit linear curve
p = polyfit(xdata,ydata,1);
yfit = polyval(p,[0:10:1000]);

% Plot new data
plot([0:10:1000],yfit,'Color','Red')
legend({'Original Data';'Linear Fit'})

Subject: Extrapolating exp data to zero

From: Torsten

Date: 13 Aug, 2013 09:35:14

Message: 3 of 3

"Kelley" wrote in message <kuc8bs$f7f$1@newscl01ah.mathworks.com>...
> I have experimental data of reaction rates and their corresponding times, the only issue I'm having is my data begins at times of say 100 seconds, but I need to know the initial rate of reaction, aka corresponding y data (reaction rates) for x data (times) between 0 and 100. I need to somehow plot my data and then extrapolate a best fit line to zero. Any help would be greatly appreciated.

Since you write about exp-data:
Do you have a theoretical model on how the reaction rate should behave over time ?

Best wishes
Torsten.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us