Changeset 2578


Ignore:
Timestamp:
10/30/09 13:41:48 (15 years ago)
Author:
Mathieu Morlighem
Message:

Spit error message if x_m and/or y_m are not set up correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/InterpFromGridToMeshx/InterpFromGridToMeshx.cpp

    r2576 r2578  
    4040        if ((M<=2) || (N<=2) || (nods<=0)){
    4141                throw ErrorException(__FUNCT__,"nothing to be done according to the dimensions of input matrices and vectors.");
     42        }
     43        if (x_in[1]-x_in[0]<0){
     44                throw ErrorException(__FUNCT__,"x coordinate vectore should be increasing.\n   use Matlab's command x=flipud(x), also flip the data matrix data=fliplr(data)");
     45        }
     46        if (y_in[1]-y_in[0]<0){
     47                throw ErrorException(__FUNCT__,"y coordinate vectore should be increasing.\n   use Matlab's command y=flipud(y), also flip the data matrix data=flipud(data)");
    4248        }
    4349
Note: See TracChangeset for help on using the changeset viewer.