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
|
Line | |
---|
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: */
|
---|
10 | Vector* gradj=NULL;
|
---|
11 | Vector* oldgradj=NULL;
|
---|
12 |
|
---|
13 | /* output datasets: */
|
---|
14 | Vector* newgradj=NULL;
|
---|
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: */
|
---|
23 | FetchData(&gradj,GRADJ);
|
---|
24 | FetchData(&oldgradj,OLDGRADJ);
|
---|
25 |
|
---|
26 | /*!Reduce load from g to f size: */
|
---|
27 | Orthx(&newgradj, gradj,oldgradj);
|
---|
28 |
|
---|
29 | /*write output datasets: */
|
---|
30 | WriteData(NEWGRADJ,newgradj);
|
---|
31 |
|
---|
32 | /*Free ressources: */
|
---|
33 | xdelete(&gradj);
|
---|
34 | xdelete(&oldgradj);
|
---|
35 | xdelete(&newgradj);
|
---|
36 |
|
---|
37 | /*end module: */
|
---|
38 | MODULEEND();
|
---|
39 | }
|
---|
40 |
|
---|
41 | void OrthUsage(void)
|
---|
42 | {
|
---|
43 | _printf_(true,"\n");
|
---|
44 | _printf_(true," usage: [newgradj] = %s(gradj,oldgradj);\n",__FUNCT__);
|
---|
45 | _printf_(true,"\n");
|
---|
46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.