File: sinf_fit.m

package info (click to toggle)
vc 1.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,552 kB
  • sloc: cpp: 19,220; ansic: 15,669; sh: 453; xml: 186; makefile: 30
file content (8 lines) | stat: -rw-r--r-- 227 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
function y = sinf_fit (x, c0, c1, c2, c3)
  x2 = x.*x;
  y = 0;
  y = (y - round_to_float(c3)) .* x2;
  y = (y + round_to_float(c2)) .* x2;
  y = (y - round_to_float(c1)) .* x2;
  y = (y + round_to_float(c0)) .* x;
endfunction