Hi David,
I am maintaining and developing the code. I am using it
both under windows xp with matlab 6.1 and linux with
matlab 7.2 . With both it runs just fine for me.
The exist('dr') problem is a bit strange and has
never occured for me. Do you have a directory named
dr ? Is e.g. your cruise-id like that ?
Or did you perhaps not start matlab in the recommended directory ?
Anyway, I will include your improvement into the code
and will try to change all exist commands in a similar
way to avoid these problems.
Your second problem can not be solved remotely.
And your try of fixing it is also not a good idea
as there should be no such error at all.
You could make your data available to me (via ftp or
similar) and I will have a look whether it happens for
me too. That's usually the way we try to solve these things.
Cheers,
Gerd
--- In ladcp@yahoogroups.com, "David" <davidsosatrejo@...> wrote:
>
> Hi guys, I'm new here, I get in because I need some help to process
> data cause with version 10.2 it doesn't work. Before we used Visbeck 7g
> and it worked ok.
>
> The problem is the next. As the readme says, first I edit the files
> from the m folder which is inside the cruise folder and some more,
> cruise_params.m & cast_params.m After copying the data to respective
> folders, I call 'process_cast(1)' for 1st station.
>
> Firstly there was a problem. It was in getinv.m function, line 76, in
> the checking of variable 'dr' The line was this:
>
> if exist('dr')
>
> and I modified it in this way:
>
> if exist('dr','var')
>
> cause in the first time, it give me an error and I observed that the
> exist('dr') returned number 7 that means "7 if A is a directory" and
> what we need -I think- to check the variable nor the directory, so I
> added the option 'var' in the exist statement. The error was fixed,
> but I got another:
>
>
> ??? Error using ==> sparse
> Index into matrix must be an integer.
>
> Error in ==> getinv>lainseta at 1071
> A = sparse(ind,j,(ind*0+1));
>
> Error in ==> getinv at 293
> A2 = lainseta(izv,ps.dz);
>
> Error in ==> lanarrow at 8
> [messages,p,dr,ps1,de,der] = getinv(messages,values,di,p,ps1);
>
> Error in ==> process_cast at 113
> lanarrow
>
>
> I observed the variables "ind" "j" are 1157x1 double. As the error
> says the variables have to be integer, I convert them to integer in
> the debug doing: ind=int32(ind); but it doesn't work. I'm a little
> lost and I don't know where the problem could be.
>
> I don't know if it's because I'm using Matlab on Windows cause I have
> seen some code in Visbeck v10.2 written in unix MacOSX and maybe
> that's why there are these fails in Windows. Is anyone using Visbeck
> (Matlab) software on Windows? In some days I'll have a PC with MacOSX
> installed to try this.
>
> Well this is all, any help will be welcome because I really need it.
> Thanks a lot...
>