Re: [Scilab-users] Hilbert transform query

2016-02-05 Thread Tim Wescott
Any time you go from 1D to 2D you suddenly end up with more than one way to do things, so I'm pretty sure that "how would one..." should really be worded "how would YOU...", or perhaps "how would someone in this field...". It sounds like you want to keep things rectilinear, so it may be best to ju

Re: [Scilab-users] issue providing command to powershell

2016-02-05 Thread David Chèze
Hi all, finally I got the solution for passing path comprising blanck character as string to the powershell() function from scilab: two simple quote ' should be used instead of n times double quotes. NB: powershell console should receive the path string encompassed with simple quote: to generate t

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Lester Anderson
Hi Simon, Sorted it now: source = fullfile('Q:\geophys\Gz.grd') grav = ncread(source,'z') // read the gravity data from GMT grid Hy = hilbert(grav); // do some math on the grid filename = fullfile('Q:\geophys\Gz_Hy_testprog.grd') nccreate(filename,'Hilb_Hy','Dimensions',list('r',601,'c',601)) //

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Simon Marchetto
The error message means that the variable is already created, you cannot create it twice. Delete the file, and try again. An example of grid writing, taken from the ncwrite() help page: nccreate(filename, 'mat', 'Dimensions', list('r', 3, 'c', 4)); ncwrite(filename, 'mat', [1 2 3 4; 5 6 7 8;

Re: [Scilab-users] Hilbert transform query

2016-02-05 Thread Lester Anderson
Hi Serge, I am working with grid data, so looking for the 2D Hilbert, the results I think should appear similar to doing a directional derivative, where X highlights features with N-S trends and E-W for Y. Lester On 5 February 2016 at 12:24, Serge Steer wrote: > Le 05/02/2016 10:56, Lester An

Re: [Scilab-users] Hilbert transform query

2016-02-05 Thread Serge Steer
Le 05/02/2016 10:56, Lester Anderson a écrit : Hello A quick query. How would one define the Hilbert transform of a grid for X and Y directions; looking for two solutions Hx and Hy (for the real values). Can you explain more precisely what you expect? Do you want to apply Hilbert transform to

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Lester Anderson
Hi Simon, Hy is a matrix and the input grid used has dimensions of 601 x 601 (x,y). Reading the data in is fine and the matrix is as expected in the variable browser. grav = ncread(source,'z') is all fine with a 601 x 601 matrix Create variable Hilb_Hy: nccreate(filename,'Hilb_Hy','Dimensions',

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Harpreet Singh Rathore
Hey You have not created the variable in the file. First you have to create a variable in the following file using the command nccreate(filename, 'Hilb_Hy', 'Dimensions', list('r', no_row, 'c', no_column); after that you can pass the ncwrite command and you have to pass like this ncwrite(filename,

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Simon Marchetto
Hello Lester , As explained in the ncwrite() help page, you have to create first the variable with nccreate() before writing it. As Hy is probably a matrix, you may have to specify also its dimensions as argument of nccreate(). And eventually its type, if it is not double. See the documentatio

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Lester Anderson
Hello Harpreet, I altered the code a bit but still get a problem Hy = hilbert(grav); filename = fullfile('Q:\geophys\Gz_Hy.grd') // set output filename // ncwrite(filename, varname, vardata, [start, [stride]]) ncwrite(filename, 'Hilb_Hy','Hy') // write variable Hilb_Hy with data from Hy Error me

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Harpreet Singh Rathore
Dear Lester, As I can see the error is saying minimum 3 inputs are required. And after going through the help of the following function, you also have to pass the value which you have to store in the 'Hy'. You can go through the help files of ncwrite by typing *help ncwrite* in the console. Regar

[Scilab-users] Hilbert transform query

2016-02-05 Thread Lester Anderson
Hello A quick query. How would one define the Hilbert transform of a grid for X and Y directions; looking for two solutions Hx and Hy (for the real values). Thanks Lester ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/list

[Scilab-users] Using Scinetcdf module

2016-02-05 Thread Lester Anderson
Hello all I am looking to use the sciNetCDF module to work with GMT grid files but have some issues. Reading a GMT grid is not a problem as far as I can tell, so the following does read the file (and z variable), storing the values in the grav array: source = fullfile('Q:\geophys\Gz.grd') grav =