[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: am stuck with quadratic function
From: |
Stephen Montgomery-Smith |
Subject: |
Re: am stuck with quadratic function |
Date: |
Mon, 26 Aug 2013 15:10:33 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 |
On 08/26/2013 01:53 PM, c. wrote:
>
> On 26 Aug 2013, at 12:22, Yud <address@hidden> wrote:
>
>> Hello guys i need your help for a quadratic function assignment. the question
>> reads as follow:
>>
>> the sales figures for a business are as follow for the first six months of
>> the year:
>> 40,000$, 44000$, 52000$, 64000$, 80000$, 84000$. the owner beleives that
>> the sales curve can be approximated by a quadratic function. find the best
>> quadratic fit to the data, and use it to estimate the projected sales for
>> the rest of the year.
>>
>> thanks a lot in assisting me for this one. I need the code that need to be
>> input to Octave to acheive the solutions.
>>
>> many thanks in advance...
>> yud
>>
>>
>
> It is a general policy on this list to not respond to questions that are
> clearly homework assignments.
>
> But you may find the anwswers you are looking for in these notes:
>
> https://staff.ti.bfh.ch/sha1/Labs/PWF/Documentation/OctaveAtBFH.pdf
>
> section 2.2 is particularly of interest.
>
> c.
But also, when it page 127, 129, etc, it has commands like
p = (F'*F) \ (F'*y)
it is sufficient to simply write
p = F \ y
See http://www.mathworks.com/help/matlab/ref/mldivide.html,
"Least-Squares Solution of Underdetermined System".