Exponential modeling code help

1 view (last 30 days)
Shai Whittaker
Shai Whittaker on 19 Sep 2014
Edited: the cyclist on 19 Sep 2014
Hi guys,
Got an assignment and my code to plot both a linear and exponential equation to the data I have doesn't seem to be working for the exponential section. The data I have on the excel spreadsheet includes the x values "Year of Coin Mintage for 5c pieces" and the y values "The amount of coins within that year. " In total the sample size was 375 coins and just by looking at it. The graph obviously best suits an exponential.
The problem I'm getting is that the exponential coefficient values are showing up as NaN which I assume means there's something wrong with my code and I can't seem to find it. I'll provide a link to the .m file and the excel spreadsheet below. I really don't know what the problem is I can't finish the assignment if I can't get the coefficient values. Also When I try to plot the final graph it plots over the second figure window for some reason. Don't know what the go is with that as well.
Many thanks.

Answers (0)

Categories

Find more on Data Import from MATLAB in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!