DaniSb170 / nctoolbox

Automatically exported from code.google.com/p/nctoolbox
0 stars 0 forks source link

Let's allow a single value for geosubset h_stride #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Let's allow a single value for geosubset h_stride.  If there is just one value 
instead of two, just assume the user meant the same value for both lon and lat. 
In other words assume that
s.h_stride = 2;
really means
s.h_stride = [2 2];

right now, if a single argument is provided, you get ugly response:

s.h_stride = 2;
>> sub= var.geosubset(s);
Attempted to access struct.h_stride(2); index out of bounds
because numel(struct.h_stride)=1.

Error in ncgeovariable/geosubset (line 459)
                        stride = [struct.t_stride
                        struct.h_stride(2) struct.h_stride(1)];

Error in ncgeovariable/subsref (line 671)
                            sref = builtin('subsref',obj,s);

Original issue reported on code.google.com by rsignell on 8 Nov 2011 at 2:51

GoogleCodeExporter commented 8 years ago

Original comment by rsignell on 8 Nov 2011 at 3:21

GoogleCodeExporter commented 8 years ago

Original comment by crosb...@gmail.com on 17 Nov 2011 at 5:21

GoogleCodeExporter commented 8 years ago
Made changes in repository

Original comment by crosb...@gmail.com on 17 Nov 2011 at 8:39