Last change
on this file since 12004 was 12004, checked in by cborstad, 13 years ago |
merged trunk-jpl into trunk-jpl-damage through revision 11990
|
File size:
939 bytes
|
Rev | Line | |
---|
[1] | 1 | /*\file Orth.c
|
---|
| 2 | *\brief: orthogonalize searching directions for inverse control methods.
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | #include "./Orth.h"
|
---|
| 6 |
|
---|
| 7 | void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
|
---|
| 8 |
|
---|
| 9 | /*input datasets: */
|
---|
[11708] | 10 | Vector* gradj=NULL;
|
---|
| 11 | Vector* oldgradj=NULL;
|
---|
[1] | 12 |
|
---|
| 13 | /* output datasets: */
|
---|
[11708] | 14 | Vector* newgradj=NULL;
|
---|
[1] | 15 |
|
---|
| 16 | /*Boot module: */
|
---|
| 17 | MODULEBOOT();
|
---|
| 18 |
|
---|
| 19 | /*checks on arguments on the matlab side: */
|
---|
| 20 | CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&OrthUsage);
|
---|
| 21 |
|
---|
| 22 | /*Input datasets: */
|
---|
[12004] | 23 | FetchData(&gradj,GRADJ);
|
---|
| 24 | FetchData(&oldgradj,OLDGRADJ);
|
---|
[1] | 25 |
|
---|
| 26 | /*!Reduce load from g to f size: */
|
---|
| 27 | Orthx(&newgradj, gradj,oldgradj);
|
---|
| 28 |
|
---|
| 29 | /*write output datasets: */
|
---|
[12004] | 30 | WriteData(NEWGRADJ,newgradj);
|
---|
[1] | 31 |
|
---|
| 32 | /*Free ressources: */
|
---|
[11708] | 33 | xdelete(&gradj);
|
---|
| 34 | xdelete(&oldgradj);
|
---|
| 35 | xdelete(&newgradj);
|
---|
[1] | 36 |
|
---|
| 37 | /*end module: */
|
---|
| 38 | MODULEEND();
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | void OrthUsage(void)
|
---|
| 42 | {
|
---|
[6412] | 43 | _printf_(true,"\n");
|
---|
| 44 | _printf_(true," usage: [newgradj] = %s(gradj,oldgradj);\n",__FUNCT__);
|
---|
| 45 | _printf_(true,"\n");
|
---|
[1] | 46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.