Previous in Forum: Choosing Best 10k Potentiometer Next in Forum: Electrostatic Separator
Anonymous Poster #1

# Matlab Question

09/05/2019 8:20 AM

Dear sirs,

I want to have 9th day data from the following table.

Day 1 : 16

Day 3 : 40

Day 7 : 65

Day 14: 90

Day 28: 99.

How can I extract data of 9th day from Matlab?

Regards,

Interested in this topic? By joining CR4 you can "subscribe" to

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, rate them!
Guru

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain. Kettle's on.
Posts: 31415
#1

### Re: Matlab Question.

09/05/2019 8:51 AM

What - as in 2/7 of (90-65) plus 65 equals 721/7?

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Guru

Join Date: Dec 2008
Location: Long Island NY
Posts: 15435
#2

### Re: Matlab Question

09/05/2019 11:45 AM

First, you have to make an assumption about the data you do have. That assumption is that the data points are not a significant anomaly from a trend.

Second, one must make a subjective judgment what trend these data points lie upon; linear, periodic, exponential, polynomial, etc.

Third, fit a function using one of the curve fitting functions in Matlab appropriate for that curve.

Fourth, insert day 9 into the fitted function.

__________________
"Don't disturb my circles." translation of Archimedes last words
Guru

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain. Kettle's on.
Posts: 31415
#3

### Re: Matlab Question

09/05/2019 11:53 AM

That looks like an exponential decay curve with a first-order time constant of about 4-5 days.

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Guru

Join Date: Dec 2008
Location: Long Island NY
Posts: 15435
#4

### Re: Matlab Question

09/05/2019 12:10 PM

It might be a fifth-order polynomial affected by a random hypergeometric probability distribution.

{I love to make things needlessly complicated, sometimes.}

__________________
"Don't disturb my circles." translation of Archimedes last words
Guru

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain. Kettle's on.
Posts: 31415
#9

### Re: Matlab Question

09/06/2019 3:34 AM

Yes. Er, um, what?

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Guru

Join Date: Dec 2008
Location: Long Island NY
Posts: 15435
#5

### Re: Matlab Question

09/05/2019 12:15 PM

Decay? Decay implies a negative slope.

__________________
"Don't disturb my circles." translation of Archimedes last words
Guru

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain. Kettle's on.
Posts: 31415
#6

### Re: Matlab Question

09/05/2019 12:21 PM

"1 minus (e to the minus k t)", then, not to be negative about it...

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Guru

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain. Kettle's on.
Posts: 31415
#10

### Re: Matlab Question

09/06/2019 3:54 AM

Correction: 61/4 days.

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9597
#7

### Re: Matlab Question

09/05/2019 12:24 PM

I think what you are after is called interpolation, you want the value for December 9.

The function you want is interp1.

Let x be date: x=[1, 3, 7, 14, 28];

Let y be value: y=[16, 40, 65, 90, 99];

x1 = 9;

y1 = interp1(x,y,x1);

There are various options for interpolation.

Here is a help page:

http://matlab.izmiran.ru/help/techdoc/ref/interp1.html

Guru

Join Date: May 2009
Location: Richland, WA, USA
Posts: 21023
#8

### Re: Matlab Question

09/05/2019 12:26 PM

73 is perhaps the closest integer estimate, maybe 74. PW's linear interpolation might not be a bad start, but the general curve indicates a bit more.

__________________
In vino veritas; in cervisia carmen; in aqua E. coli.
Interested in this topic? By joining CR4 you can "subscribe" to