Congrats again for the useful function John. I just have a qestion: i'm trying to use fminsearchcon in a 5 parameter function i've created:
(...) Here there is a long script but, at the end, the important thing are the input and outputs (...)
What I wonder is to find the parameters that optimize the error function. These parameters are interelated by the non-linear constrain:
The problem is that I don't know how to implement this constrain, the examples I have seen are just with one parameter. I have tried this:
Sir, I founf the functions very helpful. But when I'm running the function InterpolationGstat.m I'm getting an error gstat.exe has stopped working whereas I could able to run the function sampleVarioGstat.m . Can you please let me know what todo. Its really urgent.
I would like to get the semi-variogram of a very large dataset (230 000 datapoints). Gstat seems to be the perfect solution but i get this error:
Error using fgets
Invalid file identifier. Use fopen to generate
a valid file identifier.
Error in fgetl (line 34)
[tline,lt] = fgets(fid);
Error in SampleVarioGstat (line 68)
Error in AutocorrGPR (line 361)
I used Wolfgang's example for x, y and z : x = rand(1000,1)*4-2; y = rand(1000,1)*4-2; z = 3*sin(x*15)+ randn(size(x)); and I am using Matlab 2012a on MacOS 10.7.4.
Any suggestion on what the problem might be ?
I just noticed that gstat doesn't seem to be working and I'm guessing this might be the source of the error above. On top of the error message that I posted previously, I also get:
Trying to run GSTAT on gstat.cmd
GSTAT FAILED ............
I tried to download the version for Mac (http://www.gstat.org/download.html) and to put in my file, but it's still not working...
thanks for the update. There is still a minor error, that could be easily avoided. If you call InterpolationGstat for the first time and set useloc to true, than an error message tells me that File does not exist. Calling it with useloc = false is fine then. Calling it with three output arguments and useloc = true again, returns an error again.
Error in ==> InterpolationGstat at 61
??? Output argument "xi" (and maybe others) not assigned during call to
Yet, otherwise, the function works well now. The only thing I would like to see in the future is that InterpolationGstat returns the kriging variance as well. I have included it in my kriging function on the FEX because I think it is one of the most important features of kriging.
Best regards, Wolfgang