From: Anders on
Hi all,

I have some data in matlab that I would like to fit with a power law
model. The complication is that I want to force the model to pass
through a given point ( i.e. x = 37, y = 0). Maybe this is not
possible using a power law since 37^a will never equal exaclty zero
for any constant a. It is possible that I need to use a non-linear
least square approach but I`m not quite sure how to accomplish this,
does anyone have any suggestions?

Thanks,

Anders
From: Ross W on
Anders <anottrot(a)ucsd.edu> wrote in message <e1061df0-1c5b-45a3-a61d-6daf5c29f2bc(a)i4g2000prf.googlegroups.com>...
> Hi all,
>
> I have some data in matlab that I would like to fit with a power law
> model. The complication is that I want to force the model to pass
> through a given point ( i.e. x = 37, y = 0). Maybe this is not
> possible using a power law since 37^a will never equal exaclty zero
> for any constant a. It is possible that I need to use a non-linear
> least square approach but I`m not quite sure how to accomplish this,
> does anyone have any suggestions?
>
> Thanks,
>
> Anders

Hi

Perhaps you want to transform your data so that a power law is guaranteed to pass through your point of interest?

e.g. subtract 37 from all your x values, and then take a look at whether a power function looks sensible?

>> docsearch least squares

will find you the functions for this kind of fitting

Ross
From: Rune Allnor on
On 26 Jul, 09:30, Anders <anott...(a)ucsd.edu> wrote:
> Hi all,
>
> I have some data in matlab that I would like to fit with a power law
> model.  The complication is that I want to force the model to pass
> through a given point ( i.e. x = 37, y = 0).  Maybe this is not
> possible using a power law since 37^a will never equal exaclty zero
> for any constant a.  It is possible that I need to use a non-linear
> least square approach but  I`m not quite sure how to accomplish this,
> does anyone have any suggestions?

The question makes no sense. If y = f(x), then 37^a is a constant,
given a. Are you sure you don't want to fit y = 37^x or something
like that?

Rune