Re: [Scilab-users] Compute normals to 3D surface

2018-06-18 Thread arctica1963
Hi Rafael, Xarrows() worked to generate the normals in Scilab 6.0.1. Getting closer to the solution, but it gets "confused" at position (x=1.5, y=0, z=0) where the vectors should change to inbound rather than outbound as the

Re: [Scilab-users] Compute normals to 3D surface

2018-06-18 Thread arctica1963
Thanks Stéphane, Rafael for all your help. All helps with the learning process. Cheers Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org

[Scilab-users] Transparency for 3D surfaces

2018-06-21 Thread arctica1963
Hello all, A very general query, but are there plans to include transparency options to 3D (and 2D) plots/surfaces? I have seen this discussed previously with reference to 5.3.x and 5.5.2; it would certainly be useful for surface plots. Lester -- Sent from:

Re: [Scilab-users] Padding and clipping a grid

2018-08-02 Thread arctica1963
Hi Rafael, I reviewed the methodology applied in GMT (grdfft) and they use tapering from the grid edges to zero. The documentation page details more: GMT_grdfft The padding method that has been discussed previously is the similar to that of

Re: [Scilab-users] Getting netCDF files into Scilab 6.0.1

2018-08-03 Thread arctica1963
Hello Ekin, The scinetcdf package is not available compiled for Windows v6.0.1 (yet). It does work for 5.5.x to install. Reading and writing the ascii raster is a workaround until it is avialable (and working) under 6.x. Thanks for the info Lester -- Sent from:

Re: [Scilab-users] Padding and clipping a grid

2018-08-03 Thread arctica1963
Hi Rafael, Forgot to say, the source code is available for all of the GMT modules, as log as you understand C++ I just found reference to detrending prior to fft, thanks for confirming that process! Lester -- Sent from:

[Scilab-users] Moving window over 2D grid

2018-08-03 Thread arctica1963
Hello all, I know this topic has been touched on before: Efficient calculation for a moving window I am looking at running a moving window over a grid, incrementally shifting along rows and

Re: [Scilab-users] Moving window over 2D grid

2018-08-03 Thread arctica1963
Hi Rafael, At the moment I am just looking to get a general methodology/script to test. The real data grid is more like 1500x1500 or more. The function could be anything really (e.g. z=f(x,y)), but ultimately I am looking to run a radial averaged PSD from which one can extract depth to magnetic

Re: [Scilab-users] FFT - upward continuation of a 2D grid

2018-07-28 Thread arctica1963
Hi Rafael, Thanks for the pointers. Still having some issues getting it to work on real data. Upward continuation, should act like a low-pass and give a smoother view of the data. dimx=size(xt); dimy=size(yt); nx=dimx(1); ny=dimy(1); dxy = 0.01666; dkx=1/(nx*dxy); dky=1/(ny*dxy);

Re: [Scilab-users] FFT - upward continuation of a 2D grid

2018-07-28 Thread arctica1963
Hi Rafael, Problem solved with your guidance! The cellsize was in decimal degrees, so converted to linear units 0.01 degrees = 1850m approx. //dxy = 0.01666; decimal degrees - 1 arc minute dxy = 1850; dkx=1/(nx*dxy); dky=1/(ny*dxy); ... fft_clean=clean(fft2(Boug_corr)); k=fftshift(k);

[Scilab-users] Padding and clipping a grid

2018-07-29 Thread arctica1963
Hello all, I need to increase the dimensions over which the FFT is calculated to avoid edge effects, and following the suggestion of Samuel Gougeon back in 2016, this was recommended: Scilab: 6.0.1 data = [1 2 3; 4 5 6; 7 8 9] addedRows = 3; addedCols = 3; tmp = [data ; data($, :) .*.

Re: [Scilab-users] Padding and clipping a grid

2018-07-29 Thread arctica1963
Thanks for the suggestions and clarification. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

Re: [Scilab-users] Padding and clipping a grid

2018-07-29 Thread arctica1963
Hi all, I will have to look further into this. I can check the results against GMT (grdfft), I think they may use tapering but will have to look at the code (C++). Can I confirm that clipping is done via resize_matrix? Cheers Lester -- Sent from:

Re: [Scilab-users] Getting netCDF files into Scilab 6.0.1

2018-08-04 Thread arctica1963
As a general point, anyone know when the SciNetCdf package will be updated for 6.0.1 ? It fails to run/install on 6.0.1 because it references an older library (for use in 5.5.2). -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html

Re: [Scilab-users] Getting netCDF files into Scilab 6.0.1

2018-07-26 Thread arctica1963
Hi all, Just a quick update. Used a function to import an ESRI ascii raster seems to work ok: function [X,Y,Z]=asc_2_xyz(filename) fd=mopen(filename,'r'); // open ascii raster for read only k=mfscanf(fd,'%s\t%d'); nc=k(2); // number of columns k=mfscanf(fd,'%s\t%d'); nr=k(2); //

[Scilab-users] FFT - upward continuation of a 2D grid

2018-07-26 Thread arctica1963
Hello all, A quick query regarding fft and wavenumber calculations. I am looking to do an upward contuation of a gravity data grid using fft and the basic equation: fft_Grav_up = fft2(gravity_input) * e^(-kz) // think it also needs fftshif to centre Zero? ...

Re: [Scilab-users] SciNetCDF for Scilab 6.x

2018-08-10 Thread arctica1963
Thanks Ekin! Will have a go at this and see how I get on. Cheers -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org

Re: [Scilab-users] SciNetCDF for Scilab 6.x

2018-08-10 Thread arctica1963
Quick update. Tried the build, but it needs a C or Fortran compiler: --> exec builder.sce --> // Copyright (C) 2008 - INRIA --> // Copyright (C) 2009-2011 - DIGITEO --> // This file is released under the 3-clause BSD license. See COPYING-BSD. --> mode(-1); Building macros... -- Creation of

Re: [Scilab-users] SciNetCDF for Scilab 6.x

2018-08-10 Thread arctica1963
Got a gcc compiler installed (MingW) and checked that Scilab sees it The compiler failed after a load of messages: !Makelib:127: recipe for target 'libscinetcdf_hl.dll' failed ! ! ! !make: ***

[Scilab-users] SciNetCDF for Scilab 6.x

2018-08-08 Thread arctica1963
Hello, Just a quick query. Are there plans to get scinetcdf to work on Scilab 6.x? The existing version (1.2) is not compatible, but does work under 5.5.2 More a question to Simon Marchetto (package maintainer). Not sure if there is a way to manually get it working in Scilab 6.0.1 Lester --

Re: [Scilab-users] SciNetCDF for Scilab 6.x

2018-08-11 Thread arctica1963
Thanks for looking in to this, sorry can't be more help. As I understand, Scilab does support the gcc compiler and it clearly recognises it as present. At least I have a way of using GMT grids via a function to read ESR Ascii raster for now. Not convenient for large data files! Cheers Lester

[Scilab-users] ATOMS error (Scilab 6.0.1)

2018-07-21 Thread arctica1963
Hello all, Just recently been getting this error when running the ATOMS module manager: "No ATOMS module is available. Please, check your Internet connection or make sure that your OS is compatible with ATOMS." I am using version 6.0.1 and know that it was working a while back, so not sure what

[Scilab-users] Getting netCDF files into Scilab 6.0.1

2018-07-22 Thread arctica1963
Hello, I am looking to use netCDF files generated from the GMT software in Scilab 6.0.1, but there is no easy way to work the problem other than exporting the data out from the binary grids to either XYZ or ESRI Ascii raster. The latter is a more compact form with the basic structure of a header

[Scilab-users] Getting netCDF files into Scilab 6.0.1

2018-07-22 Thread arctica1963
Hello, I am looking to use netCDF files generated from the GMT software in Scilab 6.0.1, but there is no easy way to work the problem other than exporting the data out from the binary grids to either XYZ or ESRI Ascii raster. The latter is a more compact form with the basic structure of a header

Re: [Scilab-users] ATOMS error (Scilab 6.0.1)

2018-07-22 Thread arctica1963
Thanks for the update. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

Re: [Scilab-users] Getting netCDF files into Scilab 6.0.1

2018-07-22 Thread arctica1963
Thanks for the ideas, I will check the new builds and see what happens. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org

[Scilab-users] 2D Density plot

2020-02-13 Thread arctica1963
Hello all, I was wondering if it is possible to generate a 2D density plot from scattered data to highlight areas with a higher concentration of points compared to others? The image shows a subsidence plot with theoretical

Re: [Scilab-users] [EXTERNAL] Count specific values in text file

2020-02-11 Thread arctica1963
Hello Philipp Your suggestion is kind of what I am trying to do, but the text file is not a CSV structure. It is just a single, very big number on one row. A small chunk: 31415926535897932384626433832795028841971693993751058209749445923078164 etc (no spaces between digits) How best to load the

Re: [Scilab-users] [EXTERNAL] Count specific values in text file

2020-02-12 Thread arctica1963
Hi Philipp, Your script works fine using csvRead. One odd thing. Tested a few files with pi, and ones with >= 500,000 gave an error: csvRead: can not read file pi-million.txt: Error in the column structure. (same for 500,000), but worked with 250,000? Not sure if this an internal bug/limit in

Re: [Scilab-users] ?= =?utf-8?q? [EXTERNAL] Count specific values in text file

2020-02-12 Thread arctica1963
Hello Antoine I am using version 6.0.2. Not sure if it is the same issue as there is only one line in the file, but a lot of digits to handle. The error message is not exactly clear. Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html

Re: [Scilab-users] ?= ?==?utf-8?q? e

2020-02-12 Thread arctica1963
PI250KDP.TXT PI500KDP.TXT clear // path to the txt file path = 'PI250KDP.txt' // read the file as string piAsString = csvRead(path, [],[],'string') // split the string at ''

[Scilab-users] Line integrals

2020-02-25 Thread arctica1963
Hello all, I am interested in doing line integrals on f(x,y) and f(x,y,z) for scalar and vector calculations. It is not an issue to do mathematically, but not so clear in Scilab how variable substitution should work in this process. As I understand it, one has to take the function and convert it

Re: [Scilab-users] Double and triple integral query

2020-01-31 Thread arctica1963
Thanks for the update Samuel. Have added a bug/feature request related to the user input issue: Scilab bugzilla: #16309 Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list

[Scilab-users] Count specific values in text file

2020-02-11 Thread arctica1963
Hello all, Basic query. I have text files of Pi and e to a million places and I want to scan the number for the occurrences of particular values and the separation of those values in the number. This code snippet works on a vector: // create vector of elements A=[1 2 3 4 5 6 7 8 9 1 1 1 1 1 1

[Scilab-users] Polar plot query

2020-03-20 Thread arctica1963
Hi all, Very basic query. I have a polar plot and I want to just have the data points visible but not the graticule of the polar plot. I have the figure defined as f=gcf() with axes a=gca(). Is there a quick way to just turn it off? According to the figure properties it is all under the Axes

Re: [Scilab-users] Polar plot query

2020-03-20 Thread arctica1963
Many thanks! -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

[Scilab-users] Random colours for plot markers

2020-06-27 Thread arctica1963
Hello, I would like to generate random colours for the markers in a polar plot (for example), but not sure what is needed. adding: f.color_map = rand(jetcolormap(64)); will give random colours for each new plot, but what I would like to try is to randomise the colours of the markers. In the

Re: [Scilab-users] Random colours for plot markers

2020-06-27 Thread arctica1963
Thanks Rafael, That is a good solution. Would be nice if that was available directly in Polarplot Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org

Re: [Scilab-users] Random colours for plot markers

2020-06-28 Thread arctica1963
Thanks Samuel. Always good to learn different methods. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

[Scilab-users] Problem with dos function

2020-12-17 Thread arctica1963
Hello, I have an issue with the dos function for running an external program; tested in 5.5.2 and 6.1.0 with same result: --> [s,bOK]=dos('grdinfo crop1.grd') s = [] bOK = T The result of grdinfo is empty and should give the following if typed at the command prompt:

Re: [Scilab-users] Problem with dos function

2020-12-18 Thread arctica1963
Hello Samuel, Yes I did try the powershell option and it is the same response, the program runs (boolean result is true) but the result is not resolved in the output. The external program is using GMT (Generic mapping tools) and so that needs to be installed to test this issue. I also installed

Re: [Scilab-users] Problem with dos function

2020-12-19 Thread arctica1963
HI Samuel, Tried the unix_*() options with no success, redirect also did not work. Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org

Re: [Scilab-users] Problem with dos function

2020-12-19 Thread arctica1963
Hi Samuel, Tested with consolebox on and it is empty, so it's not sending data there. As a test, I did a simple windows copy: dos('copy crop1.grd crop1a.grd','-echo') and that worked, so no issue with basic windows commands. Not sure what else to try unless it's an installation issue? Lester

Re: [Scilab-users] Problem with dos function

2020-12-20 Thread arctica1963
Same issue with console-only Scilab: Scilex,exe and WScilex-cli.exe. For reference, GMT can be installed from https://www.generic-mapping-tools.org/ Using Win64 version https://github.com/GenericMappingTools/gmt/releases/tag/6.1.1 Lester -- Sent from:

Re: [Scilab-users] Multiple regression on semi-log plot

2020-11-14 Thread arctica1963
Hello, Thanks for the idea and suggestions. Not too sure how to apply it, if you could give some pointers on the attached data and code. The ultimate idea is to get the slopes of the straight line segments. Many thanks, Lester clear clf() // Read data - wavelength (in km)), power, 1 standard

Re: [Scilab-users] Multiple regression on semi-log plot

2020-11-16 Thread arctica1963
Hello, Thanks for showing how it works, always good to get a proper understanding. Just wondering if the code can be adapted to find multiple straight line segments? Looking at my original test data, it appears to have "kinks" at wavenumber (0.05, 0.12 and 0.16), the last one is where the x

Re: [Scilab-users] {EXT} Re: Multiple regression on semi-log plot

2020-11-19 Thread arctica1963
Hello, Just a quick thought. But could a moving window over the wavenumber provide a simpler route to locating the kink points for computing the slope segments? Perhaps a window size of say 0.05 and shifted 0.025 with the existing methodology you outlined Stephane. Lester -- Sent from:

[Scilab-users] Multiple regression on semi-log plot

2020-11-09 Thread arctica1963
Hello, I am looking to determine multiple regression lines from a single power spectral dataset (log power vs radial wavenumber), and was wondering if it is feasible in Scilab to compute something similar to the attached plot? I did locate a Matlab code for finding a turning point in a plot and

[Scilab-users] Triple integral (int3d) query

2021-01-01 Thread arctica1963
Hello all, I have worked out a simpler input for 2D integration with a function that calls int2d: function [Integral, error]=Integral_2d(xmin,xmax,ymin,ymax,f) X=[xmin xmax xmax; xmin xmax xmin]' Y=[ymin ymin ymax; ymin ymax ymax]' [Integral, error]=int2d(X,Y,f) endfunction This

Re: [Scilab-users] Triple integral (int3d) query

2021-01-01 Thread arctica1963
Hi Samuel, Many thanks for the suggestion. Happy New Year to you too. Kind regards Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org

[Scilab-users] Int3D / Triple integration

2021-03-25 Thread arctica1963
Hello, Following on from a previous query I had on this matter, I am not having much success with int3d for triple integration, largely due to the need to build tetrahedrons. CGLab does have this option (delauney3d) but is not available for 6.1.0, and it is not entirely clear how it would

Re: [Scilab-users] Int3D / Triple integration

2021-04-02 Thread arctica1963
Hi Stephane, At the moment I am just trying to understand how Scilab works with triple integration of f(x,y,z) with limits for xyz. Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users

Re: [Scilab-users] Int3D / Triple integration

2021-04-02 Thread arctica1963
Hello all, An update on a solution. Following e-mail correspondence with a fellow Scilab user (Javier Domingo), he has worked out a general solution to vectorising the X,Y,Z arrays for the tetrahedrons required by int3d. So taking this part of the code and adding a call to int3d within a function

Re: [Scilab-users] Int3D / Triple integration

2021-04-02 Thread arctica1963
Hi Stephane, Thanks for the information and methodology, useful to know. Learn something new all the time with Scilab! Kind regards Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users

Re: [Scilab-users] Int3D / Triple integration

2021-04-02 Thread arctica1963
Quick query re: your code, How is the index (i) defined? i = [5 8 2 3 5 8 2 6 5 8 3 7 5 2 3 1 2 3 8 4]'; Just trying to fully understand your method. Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html

[Scilab-users] Filled polygons from polylines

2021-04-07 Thread arctica1963
Hello, I have script that reads a csv file containing the data and uses that to calculate subsidence from well information. This all works fine, but it is not the best way to display the result. Is it possible to take the polyline output and generate filled polygons (similar to attached image)?

Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread arctica1963
Hello Antoine, Your code does seem to work since the x locations are constant for each curve. However, I cannot see where exactly to apply the code for each layer within my existing code and how to apply different fill colours. This works to fill between the 2nd and 3rd polylines (see image):

Re: [Scilab-users] Filled polygons from polylines

2021-04-07 Thread arctica1963
Think I spotted it... figure(1), clf f=gcf(); f.figure_size=[1024,800]; f.figure_name = "Subsidence of the Kufrah Basin Well A1-NC198"; f.background=8 // white background title ('Subsidence of the Kufrah Basin Well A1-NC198') // Figure title subplot (2,1,1) a=gca(); a.font_size=3

Re: [Scilab-users] Filled polygons from polylines

2021-04-13 Thread arctica1963
Hi Samuel, Thanks for the suggestion. I have not managed to get it working with the existing code as it generates an invalid index error; not sure what is going on. I tidied up the file for clarity. Following your example, plot(x, [0 y3 0]) would be plot(-t, [0 -xu(1,1:n) 0] ) in this code, but

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread arctica1963
Hi Samuel, Sorted out the code and it works.Had to manually set the filled areas upper time limit (t=97) (plot(-[97 t], [0 y1]) ). Set two graphic handles for upper and lower plot. Just random colours to test! Is there a way to do a loop over the curves to save multiple plots Thanks Lester

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread arctica1963
Sorry, I did not make it clear. Instead of the following which updates the existing graphic to generate the final plot (y1 to y10); plot(-[t(n) t], [0 y1]) plot(-[t(n) t], [0 y2]) plot(-[t(n) t], [0 y3]) plot(-[t(n) t], [0 y4]) plot(-[t(n) t], [0 y5]) plot(-[t(n) t], [0 y6]) plot(-[t(n) t], [0

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread arctica1963
Truncated plot at t=97 -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org

Re: [Scilab-users] Filled polygons from polylines

2021-04-14 Thread arctica1963
Many thanks Antoine Lester -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

Re: [Scilab-users] Scilab & cdf-file format

2021-02-12 Thread arctica1963
Hello There is a toolbox for 5.5.2 called scinetcdf which will work - this will work with the standard netCDF format. However, it will not work in version 6.x of Scilab. Perhaps a Scilab expert could look at how to get it compiled for the latest Scilab? Cheers Lester -- Sent from: