Message Boards Message Boards

0
|
924 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

Help with FindFit

Posted 10 years ago
I want to find the equation for five points of given data,
the given data is:
data = {{250, 600000}, {60, 200000}, {25, 60000}, {12, 10000}, {5, 2500}};

And i want it to fit to the function:
Log(y)=a+b*Log(x)

Rewritten as:
y=e^(a+b*Log(g))

To solve this i use FindFit as follows:
FindFit[data, E^(a + b*Log (x)), {a, b}, x]

However, this is giving me the following error:
FindFit::nrlnum: "The function value {-250.+2.71828^(1. +600000.\Log),-60.+2.71828^(1. +200000.\Log),-25.+2.71828^(1. +60000.\Log),-12.+2.71828^(1. +10000.\Log),-5.+2.71828^(1. +2500.\Log)} is not a list of real numbers with dimensions {5} at {a,b} = {1.`,1.`}"
POSTED BY: Jacob Kimblad
2 Replies
Use Mathematica syntax for Log.
POSTED BY: Daniel Lichtblau
Posted 10 years ago
Thank you, its always misstakes like these that are the most frustrating.
POSTED BY: Jacob Kimblad
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract