Search found 2 matches

by chilequan
Fri Dec 23, 2011 2:30 am
Forum: ROMS Tools and Techniques
Topic: TPXO to ROMS EXPRESS (tide extraction software)
Replies: 110
Views: 3654367

Re: TPXO to ROMS EXPRESS (tide extraction software)

It's true that min(min(....)) can only return a single value. But the codes are "[j,i]=find(dr==min(min(dr(VARinterp~=0)))));", and "find(dr=='some value')" may return more than one result. ================================================= Here is an easy example: >> a=[1 2;1 4]; [i,j]=find(a==min ...
by chilequan
Thu Dec 22, 2011 3:08 am
Forum: ROMS Tools and Techniques
Topic: TPXO to ROMS EXPRESS (tide extraction software)
Replies: 110
Views: 3654367

Re: TPXO to ROMS EXPRESS (tide extraction software)

I think I find a bug. Line 74 and line 80 in file "interpTPXO.m" may lead to mistakes when we get more than one i,j value from "[j,i]=find(dr==(min(min(dr(VARinterp~=0)))));". I use "VARinterp(ff(n))=VARinterp(j(1),i(1));" to fix it, but I'm not sure whether it is right.(I don't read scripts ...