23.07.2012 Views

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

polyfit<br />

0polyfit<br />

Purpose Polynomial curve fitting<br />

<strong>C++</strong> Prototype mwArray polyfit(const mwArray &x, const mwArray &y,<br />

const mwArray &n);<br />

295<br />

mwArray polyfit(mwArray *s, const mwArray &x, const mwArray &y,<br />

const mwArray &n);<br />

<strong>C++</strong> Syntax #include "matlab.hpp"<br />

<strong>MATLAB</strong><br />

Syntax<br />

mwArray x, y, n; // Input argument(s)<br />

mwArray s; // Output argument(s)<br />

mwArray p; // Return value<br />

p = polyfit(x,y,n);<br />

p = polyfit(&s,x,y,n);<br />

p = polyfit(x,y,n)<br />

[p,s] = polyfit(x,y,n)<br />

See Also <strong>MATLAB</strong> polyfit Calling Conventions

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!