<div dir="ltr">Dear Lester,<div><br></div><div>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 <b>help ncwrite</b> in the console.</div><div><br></div><div>Regards</div><div>Harpreet</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 5, 2016 at 3:18 PM, Lester Anderson <span dir="ltr"><<a href="mailto:arctica1963@gmail.com" target="_blank">arctica1963@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all<br>
<br>
I am looking to use the sciNetCDF module to work with GMT grid files<br>
but have some issues.<br>
<br>
Reading a GMT grid is not a problem as far as I can tell, so the<br>
following does read the file (and z variable), storing the values in<br>
the grav array:<br>
<br>
source = fullfile('Q:\geophys\Gz.grd')<br>
grav = ncread(source,'z')<br>
Hy = hilbert(grav); // write Hy variable to new file<br>
<br>
I am having problems with writing out the processed data e.g write a<br>
new grid (Gz_Hy.grd) with the Hilbert transform solution<br>
<br>
filename = fullfile('Q:\geophys\Gz_Hy.grd')<br>
ncwrite(filename, 'Hy') // does not work<br>
<br>
Error return:<br>
<br>
ncwrite(filename, 'Hy')<br>
                       !--error 77<br>
ncwrite: Wrong number of input argument(s): 3 to 5 expected.<br>
at line       5 of exec file called by :<br>
exec('Q:\geophys\Lester\SCILAB_work\netcdf1.sce', -1)<br>
<br>
Any advice would be appreciated.<br>
<br>
Thanks<br>
Lester<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Thanks and Regards<br></div>Harpreet Singh<br></div></div>
</div>