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:
cftool Help

Subject: cftool Help

From: S

Date: 10 Nov, 2011 16:30:26

Message: 1 of 7

Hi I have data in x and y.

I know for sure that as x increases, y should always decrease.

I also believe a polynomial (quad) to be the most suitable fit.

However, When I fit the data with a polynomial sometimes just before the last data point I tend to get a minima in the function.

Is it possible for me to somehow get the cftool to know that no such minima can exist since y will always decrease as x increases?

Hopefully, that is clear. Please help.

thanks

Subject: cftool Help

From: dpb

Date: 11 Nov, 2011 23:55:24

Message: 2 of 7

On 11/10/2011 10:30 AM, S wrote:
> Hi I have data in x and y.
>
> I know for sure that as x increases, y should always decrease.
>
> I also believe a polynomial (quad) to be the most suitable fit.
...

Reflect the data at the right hand side to force symmetry will put the
minimum farther out, but sounds like a decaying model would make more
sense than a polynomial given the constraints.

--

Subject: cftool Help

From: S

Date: 16 Nov, 2011 20:50:27

Message: 3 of 7

dpb <none@non.net> wrote in message <j9kcld$gtl$1@speranza.aioe.org>...
> On 11/10/2011 10:30 AM, S wrote:
> > Hi I have data in x and y.
> >
> > I know for sure that as x increases, y should always decrease.
> >
> > I also believe a polynomial (quad) to be the most suitable fit.
> ...
>
> Reflect the data at the right hand side to force symmetry will put the
> minimum farther out, but sounds like a decaying model would make more
> sense than a polynomial given the constraints.
>
> --
Thanks for response.

So... the only way is to manipulate the data. Is there no setting in the cftool itself?

Subject: cftool Help

From: dpb

Date: 16 Nov, 2011 21:55:46

Message: 4 of 7

On 11/16/2011 2:50 PM, S wrote:
...


> So... the only way is to manipulate the data. Is there no setting in the
> cftool itself?

How can there be? It's inherent in the limitations of a quadratic (at
least fitted by least squares) and the input data.

--

Subject: cftool Help

From: dpb

Date: 16 Nov, 2011 22:36:12

Message: 5 of 7

On 11/16/2011 3:55 PM, dpb wrote:
> On 11/16/2011 2:50 PM, S wrote:
> ....
>
>
>> So... the only way is to manipulate the data. Is there no setting in the
>> cftool itself?
>
> How can there be? It's inherent in the limitations of a quadratic (at
> least fitted by least squares) and the input data.

To repeat the first response, it would seem a quadratic poly would be
about as poor a choice of a model for such data as one could pick.

_WHY_ do you think a polynomial is apt, anyway?

--

Subject: cftool Help

From: S

Date: 16 Nov, 2011 22:55:29

Message: 6 of 7

dpb <none@non.net> wrote in message <ja1dso$u9q$2@speranza.aioe.org>...
> On 11/16/2011 3:55 PM, dpb wrote:
> > On 11/16/2011 2:50 PM, S wrote:
> > ....
> >
> >
> >> So... the only way is to manipulate the data. Is there no setting in the
> >> cftool itself?
> >
> > How can there be? It's inherent in the limitations of a quadratic (at
> > least fitted by least squares) and the input data.
>
> To repeat the first response, it would seem a quadratic poly would be
> about as poor a choice of a model for such data as one could pick.
>
> _WHY_ do you think a polynomial is apt, anyway?
>
> --
Thanks for responses.
Actually quadratic is the correct choice for this data but you wouldn't know that. It is too complex and clumsy to go in to the whys and wherefores.

However your response tells me that the cftool is inadequate to do what I want it to. Therefore, I will take the suggestion of the first responder and mirror the data - thanks.

Subject: cftool Help

From: dpb

Date: 16 Nov, 2011 23:50:11

Message: 7 of 7

On 11/16/2011 4:55 PM, S wrote:
> dpb <none@non.net> wrote in message <ja1dso$u9q$2@speranza.aioe.org>...
>> On 11/16/2011 3:55 PM, dpb wrote:
>> > On 11/16/2011 2:50 PM, S wrote:
>> > ....
>> >
>> >
>> >> So... the only way is to manipulate the data. Is there no setting
>> in the
>> >> cftool itself?
>> >
>> > How can there be? It's inherent in the limitations of a quadratic (at
>> > least fitted by least squares) and the input data.
>>
>> To repeat the first response, it would seem a quadratic poly would be
>> about as poor a choice of a model for such data as one could pick.
>>
>> _WHY_ do you think a polynomial is apt, anyway?
>>
>> --
> Thanks for responses.
> Actually quadratic is the correct choice for this data but you wouldn't
> know that. It is too complex and clumsy to go in to the whys and
> wherefores.
>
> However your response tells me that the cftool is inadequate to do what
> I want it to. Therefore, I will take the suggestion of the first
> responder and mirror the data - thanks.

That would have been--me. :)

It's not the tool; it's the selected model.

--

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