Re: Polyfit with three variable
Andreas Stahel <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.general |
|---|---|
| Message-ID | <[email protected]> |
mmuetzel wrote > Am 20. Dezember 2020 um 15:57 Uhr schrieb "swagata Mukherjee": >> Hi, >> My question is whether we have any method by which I can use regression >> with 3 variables like polyfit(x,y,z,N)? >> Regards > > This answer on the discourse forum might be helpful: > https://octave.discourse.group/t/execucao-do-codigo/497/8 > > In principle, that approach also works for multi-dimensional polynomials > of higher degree. > > HTH, > Markus The linl given by Markus is a good one. You might have a look at the command LinearRegression() in the optimization package or the command regress(). To deal with multiple variable have a look at Section 2.2 in https://web.sha1.bfh.science/Labs/PWF/Documentation/OctaveAtBFH.pdf Example 2 (p. 162) and Example 4 (p. 168) use multiple variables. I hope this helps Andreas -- Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html