Rev | Line | |
---|
[37] | 1 | function compare(A, B, T, E) |
---|
| 2 | % Test function to check that two quaternion arrays (real or complex) |
---|
| 3 | % are equal, to within a tolerance, and if not, to output an error |
---|
| 4 | % message from the string in the parameter E. |
---|
| 5 | |
---|
| 6 | % Copyright © 2005, 2006 Stephen J. Sangwine and Nicolas Le Bihan. |
---|
| 7 | % See the file : Copyright.m for further details. |
---|
| 8 | |
---|
| 9 | error(nargchk(4, 4, nargin)), error(nargoutchk(0, 0, nargout)) |
---|
| 10 | |
---|
| 11 | if any(any( abs(abs(A - B)) > T )) |
---|
| 12 | max(max(abs(abs(A-B)))) % Added 13 March 2006 to show the max error. |
---|
| 13 | error(E); |
---|
| 14 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.