Previous in Forum: Choosing Best 10k Potentiometer   Next in Forum: Electrostatic Separator
Close
Close
Close
10 comments
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,

Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be "almost" Good Answers:

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
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

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: 31836
Good Answers: 834
#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
Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15477
Good Answers: 956
#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
Reply
Guru
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

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: 31836
Good Answers: 834
#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
Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15477
Good Answers: 956
#4
In reply to #3

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
Reply
Guru
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

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: 31836
Good Answers: 834
#9
In reply to #4

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
Reply
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15477
Good Answers: 956
#5
In reply to #3

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
Reply
Guru
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

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: 31836
Good Answers: 834
#6
In reply to #5

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
Reply
Guru
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

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: 31836
Good Answers: 834
#10
In reply to #3

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
Reply
Guru

Join Date: Apr 2010
Location: About 4000 miles from the center of the earth (+/-100 mi)
Posts: 9675
Good Answers: 1103
#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

Reply Score 1 for Good Answer
Guru
Technical Fields - Technical Writing - New Member Engineering Fields - Piping Design Engineering - New Member

Join Date: May 2009
Location: Richland, WA, USA
Posts: 21024
Good Answers: 792
#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.
Reply Score 1 for Good Answer
Reply to Forum Thread 10 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Comments rated to be "almost" Good Answers:

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

Users who posted comments:

PWSlack (5); redfred (3); Rixter (1); Tornado (1)

Previous in Forum: Choosing Best 10k Potentiometer   Next in Forum: Electrostatic Separator

Advertisement