Prev: xPC Real-time interrupt source
Next: Linear combination of linearly independent rows/columns of matrix
From: Bruce Bowler on 22 Apr 2010 09:19 On Thu, 22 Apr 2010 13:03:05 +0000, Konrad set fingers to keyboard and typed: > Hi John, > > I've downloaded your function, but don't see how I get R² out of it. > Could you please indicate how it is done? > > Best wishes, > Konrad I'm not John, but, from reading the help, The output is a structure. One of the items in the structure is R2 which is the r^2 of the fit. Bruce
From: John D'Errico on 22 Apr 2010 09:26 "Konrad " <Konrad.Lehmann(a)uni-jena.de> wrote in message <hqphe9$5om$1(a)fred.mathworks.com>... > Hi John, > > I've downloaded your function, but don't see how I get R² out of it. Could you please indicate how it is done? > Read the help. Our just look at the output. P = polyfitn(x,y,1) P = ModelTerms: [2x1 double] Coefficients: [4.7555 -16.228] ParameterVar: [0.041696 0.79748] ParameterStd: [0.2042 0.89302] R2: 0.99268 RMSE: 0.14613 VarNames: {} P.R2 ans = 0.99268 John
From: Konrad on 22 Apr 2010 09:38 Thanks, my fault. I hadn't yet set the path to the new directory in the toolbox, so the function hadn't yet worked. Now, of course, it's obvious. "John D'Errico" <woodchips(a)rochester.rr.com> wrote in message <hqpiq0$73$1(a)fred.mathworks.com>... > "Konrad " <Konrad.Lehmann(a)uni-jena.de> wrote in message <hqphe9$5om$1(a)fred.mathworks.com>... > > Hi John, > > > > I've downloaded your function, but don't see how I get R² out of it. Could you please indicate how it is done? > > > > Read the help. Our just look at the output. > > P = polyfitn(x,y,1) > P = > ModelTerms: [2x1 double] > Coefficients: [4.7555 -16.228] > ParameterVar: [0.041696 0.79748] > ParameterStd: [0.2042 0.89302] > R2: 0.99268 > RMSE: 0.14613 > VarNames: {} > > P.R2 > ans = > 0.99268 > > John
First
|
Prev
|
Pages: 1 2 Prev: xPC Real-time interrupt source Next: Linear combination of linearly independent rows/columns of matrix |