Changeset 3249


Ignore:
Timestamp:
03/10/10 13:51:47 (15 years ago)
Author:
Mathieu Morlighem
Message:

Fixed contourtonodes

Location:
issm/trunk/src/mex/ContourToNodes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/mex/ContourToNodes/ContourToNodes.cpp

    r2333 r3249  
    3232        double* y=NULL;
    3333        int     edgevalue;
     34        char*   interptype=NULL;
    3435
    3536        /* output: */
     
    4647
    4748        /*checks on arguments on the matlab side: */
    48         //CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ContourToNodesUsage); Cant' use it here, as we have variable  outputs.
    49         if((nlhs==0) && (nrhs=0)){
    50                 ContourToNodesUsage();
    51                 throw ErrorException(__FUNCT__," usage. See above");
    52         }
     49        CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ContourToNodesUsage);
    5350
    5451        /*Fetch inputs: */
     
    7572        }
    7673
    77         #ifdef _ISSM_DEBUG_
    78         for(i=0;i<numcontours;i++){
    79                 printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
    80                 contouri=*(contours+i);
    81                 printf("   Number of grids %i\n",contouri->nods);
    82                 for (j=0;j<contouri->nods;j++){
    83                         printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
    84                 }
    85         }
    86         #endif
    87 
    8874        /*Run interpolation routine: */
    89         ContourToNodesx( &flags,x,y,nods,contours,numcontours,edgevalue);
     75        ContourToNodesx(&flags,x,y,nods,contours,numcontours,edgevalue);
    9076
    9177        /* output: */
     
    9480        /*end module: */
    9581        MODULEEND();
    96        
     82
    9783}
    9884
    99 void ContourToNodesUsage(void)
    100 {
     85void ContourToNodesUsage(void){
    10186        printf("   usage:\n");
    102         printf("   [flags]=ContourToNodes(,x,y,contours,edgevalue);\n\n");
     87        printf("   [flags]=ContourToNodes(x,y,contours,edgevalue);\n\n");
    10388        printf("   where:\n");
    10489        printf("      x,y: list of nodes.\n");
  • issm/trunk/src/mex/ContourToNodes/ContourToNodes.h

    r1103 r3249  
    3232/* serial arg counts: */
    3333#undef NLHS
    34 #define NLHS  2
     34#define NLHS 1
    3535#undef NRHS
    3636#define NRHS 4
Note: See TracChangeset for help on using the changeset viewer.