Last change
on this file since 4 was
4,
checked in by zhangj, 10 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
349 bytes
|
Line | |
---|
1 | function k = idLeastSqLineTilt(arArg, arFunc) |
---|
2 | |
---|
3 | k = 0; |
---|
4 | numArg = length(arArg); |
---|
5 | numFunc = length(arFunc); |
---|
6 | |
---|
7 | if (numArg ~= numFunc) |
---|
8 | sprintf('Inconsistent numbers of points in the argument and function values arrays'); |
---|
9 | return; |
---|
10 | end |
---|
11 | |
---|
12 | s1 = 0; |
---|
13 | s2 = 0; |
---|
14 | for i = 1:numArg |
---|
15 | s1 = s1 + arArg(i)*arFunc(i); |
---|
16 | s2 = s2 + arArg(i)*arArg(i); |
---|
17 | end |
---|
18 | k = s1/s2; |
---|
Note: See
TracBrowser
for help on using the repository browser.