[Scilab-users] Converted bb.m Matlab code

2024-06-07 Thread Lester Anderson
Hello, I have converted the Matlab code bb.m into Scilab and the calculations are all fine. Verified the results in Octave. However, the beachball fill plot is not working: The Octave/Matlab plot is fine, but the Scilab plot is not filled properly suggesting that xfpoly is reading the vertex

Re: [Scilab-users] Extract data from a contour2d plot

2024-06-04 Thread Lester Anderson
A workaround finds the unique segments from the plot: contour2d(x, y, uz, [0 0]); f = gca().children.children polyline_idx = find(f.type == 'Polyline'); curve1 = f(polyline_idx(1)).data; curve2 = f(polyline_idx(2)).data; curve3 = f(polyline_idx(3)).data; On Tue, 4 Jun 2024 at 08:44, Lester

[Scilab-users] Extract data from a contour2d plot

2024-06-04 Thread Lester Anderson
Hello, I have a simple contour2d plot that contours the zero level in a dataset, and that is fine. However, it is not easy to extract the data for the two curves as the figure properties suggest that the data are duplicated. Checking the graphic entities: f=gca().children.children f = [12x1

[Scilab-users] Gridding irregular data to apply contour or Sgrayplot

2024-05-30 Thread Lester Anderson
Hello, Given the attached plot example, is it possible to contour or use Sgrayplot on such data if it is not on a regular grid? The plot is a Kaverina earthquake analysis, and I am looking to generate a density plot within the Kaverina plot region only.All arrays have the same size,

Re: [Scilab-users] Clipping curves given coordinates

2024-05-17 Thread Lester Anderson
Data upload as a zip file On Fri, 17 May 2024 at 11:57, Lester Anderson mailto:arctica1...@gmail.com>> wrote: Following on from Stephane's suggestion I tried the code suggested but only partly solved the problem: Code is attached with the program data. The discourse site did not all

Re: [Scilab-users] Clipping curves given coordinates

2024-05-17 Thread Lester Anderson
Following on from Stephane's suggestion I tried the code suggested but only partly solved the problem: Code is attached with the program data. The discourse site did not allow CSV uploads. Lester On Wed, 15 May 2024 at 11:42, Lester Anderson mailto:arctica1...@gmail.com>> wrote: Hel

[Scilab-users] Clipping curves given coordinates

2024-05-16 Thread Lester Anderson
Hello, I have a plot which forms the basis of an earthquake focal mechanism solution (attached). The code is adapted from the Matlab BB.m code. What I am looking to do is clip the curves along segments (A-B), (B-C) and (A-C), concatenate the x and y values and fill the polygon using xfpoly..

[Scilab-users] Compute gradients of grid data

2024-04-05 Thread Lester Anderson
Hello, I am looking to create a hillshade function, but issues arise defining the the X and Y gradients. The test code so far: function [grad_x, grad_y] = compute_gradients(dem) grad_x = diff(dem, 1, 'c'); grad_y = diff(dem, 1, 'r'); endfunction // Create a test DEM grid dem=[1.23

Re: [Scilab-users] Making a polygon fill part-transparent

2024-02-28 Thread Lester Anderson
As Stephane suggested I exported as SVG and used Inkscape to change the opacity. Lester On Mon, 26 Feb 2024 at 15:20, Lester Anderson mailto:arctica1...@gmail.com>> wrote: Hello, Is it possible to make a polygon fill say 50% transparent in a plot? It is easy to just leave it as an o

[Scilab-users] Making a polygon fill part-transparent

2024-02-26 Thread Lester Anderson
Hello, Is it possible to make a polygon fill say 50% transparent in a plot? It is easy to just leave it as an outline poly.The code plots a stereographic net and two planes with a vector line marking the line of intersection. Any suggestions would be helpful. Thanks Lester This email and

[Scilab-users] Possible bug in mfile2sci

2024-01-03 Thread Lester Anderson
Hello, I have tried to convert the following Matlab code as a whole and even a very basic function, but it fails to generate anything! function [x0,y0,iout,jout] = intersections(x1,y1,x2,y2,robust) %INTERSECTIONS Intersections of curves. % Computes the (x,y) locations where two curves

Re: [Scilab-users] Label and tick interval on an axis

2023-11-13 Thread Lester Anderson
[0,1] But get an error "labels should be a string vector." referenced at x_ticks.locations. Labels are a string vector? Where is the "Step by" option available in figure edit? On Fri, 10 Nov 2023 at 09:14, Lester Anderson mailto:arctica1...@gmail.com>> wrote: Hello A quick quer

[Scilab-users] Label and tick interval on an axis

2023-11-13 Thread Lester Anderson
Hello A quick query. I have an axis with a range from 1-10 but the plot has ticks and labels at 0.5 intervals (1.0, 1.5, 2.0, 2.5 etc). How can I set the interval and ticks at 1, 2 3 4, etc ? In the figure properties there is an option to set subticks =0 and step by=1 which does the job.

Re: [Scilab-users] Label and tick interval on an axis

2023-11-13 Thread Lester Anderson
"labels"], 1:1:10, string(1:1:10)); // no sub-tick graduations f.sub_ticks=[0,1] On Sat, 11 Nov 2023 at 13:22, Lester Anderson mailto:arctica1...@gmail.com>> wrote: As a quick update: I have tried the following: f.auto_ticks(1)='off' f.x_ticks.locations=[1;2;3;4;5;6;7;8;9;10] f.

[Scilab-users] Height of x_choices list box

2023-10-20 Thread Lester Anderson
Hello, I have code for the periodic table of elements (all 118) and selection is via x_choices and a list. Is there any way to control the strat-up height of the selection box as at the moment, it stretches top to bottom of the screen and you have to manually shrink it to get to the ok/cancel

Re: [Scilab-users] Loop over string vector

2023-10-04 Thread Lester Anderson
You can also use the part function which works with vectors rgb=[part(x,1:2),part(x,3:4),part(x,5:6)]; Le 02/10/2023 à 09:52, Lester Anderson a écrit : Hello, I am trying to loop through a vector of strings but having issues with the strsplit function. The vector consists of HEX values for colours. I

Re: [Scilab-users] Loop over string vector

2023-10-04 Thread Lester Anderson
)); blue(i)=hex2dec(rgb(i,3)); RGB_colours=cat(2,red,green,blue); end On Tue, 3 Oct 2023 at 12:42, Lester Anderson mailto:arctica1...@gmail.com>> wrote: Hello Thanks for the suggestions. The 'part' option worked but the function fails at hexrgb=strsplit(x(i),[2 4])'; strsplit: Wrong size for

[Scilab-users] Loop over string vector

2023-10-03 Thread Lester Anderson
Hello, I am trying to loop through a vector of strings but having issues with the strsplit function. The vector consists of HEX values for colours. I created a simple function to get RGB values. function rgb=hex2rgb(x) // x=string input hexrgb=strsplit(x,[2 4])';

[Scilab-users] Changing properties of multiple compound objects

2023-09-11 Thread Lester Anderson
Hello all, I have a plot of an Equal-area stereonet with small circles and great circles plotted. However, all the polylines are stored as compound objects (in this case 38); is there a way to unglue all compound objects in one go? Unglue seems to just do one at a time. Also, any pointers on

Re: [Scilab-users] Changing properties of multiple compound objects

2023-09-11 Thread Lester Anderson
2011. On Sat, 9 Sept 2023 at 15:03, Lester Anderson mailto:arctica1...@gmail.com>> wrote: Hello all, I have a plot of an Equal-area stereonet with small circles and great circles plotted. However, all the polylines are stored as compound objects (in this case 38); is there a way to

Re: [Scilab-users] Complex input to a function

2023-07-19 Thread Lester Anderson
precise. function zz=zeta(s, n) if isreal(s)==%F zz = zeta_3(s,n) elseif s>0 & s<1 zz = zeta_3(s,n) elseif s==0 zz=-0.5 elseif s==1 zz=%inf elseif s < 0 zz = zeta_2(s,n) else s > 1 zz = zeta_1(s,n) end endfunction Lester On Mon, 17 Jul 2023 at 11:41,

[Scilab-users] Complex input to a function

2023-07-19 Thread Lester Anderson
Hello, I have made a function to approximate the Riemann Zeta Function (see attached), but complex input only works by directly calling zeta_3(s,n). Calling zeta((0.5 + 3*%i),1e6) gives an error message: "Complex comparison not supported. Please define %s_2_s_custom() or check your code." For

[Scilab-users] FITS data load and export

2023-06-14 Thread Lester Anderson
Hello, I have a small FITS file that is 4D and was wondering if this can be loaded into Scilab and saved out as a csv file? The header looks like this: SIMPLE =T /file does conform to FITS standard BITPIX = -32 /bits per data value NAXIS =

[Scilab-users] x/y labels formatting

2023-04-11 Thread Lester Anderson
Hello, A quick query, how can I make the 's' in (Rs) a subscript? Thanks Lester xlabel 'Relative distance in Schwartzschild Radii (Rs)' fontname 4 fontsize 4 This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be

[Scilab-users] Random polyline colours and polyline segments

2023-03-28 Thread Lester Anderson
Hello, I am revisiting the Collatz plots and wondered how one can (a) randomise the polyline colours and (b) colour the polyline segments from first to last segment given a range of start-to-end colours? Thanks for any pointers Lester This email and any attachments are intended solely for

Re: [Scilab-users] Scilab releases schedule / End of Windows 32-bit support

2023-02-27 Thread Lester Anderson
Hello all, I await with interest the new version of Scilab. I only use the 64-bit version so have no issues with the 32-bit version being cut. Most people will be working on 64-bit systems anyway, and so makes sense to reduce or cut support for the 32-bit architecture. With regard to

Re: [Scilab-users] Extract closest value

2022-06-02 Thread Lester Anderson
d B are not too big you can proceed as follow: > E=abs(ones(B')*A-B'*ones(A)) > > [i,j]=ind2sub(find(E<=0.3),size(E)); > Serge > > Le 02/06/2022 à 10:17, Lester Anderson a écrit : > > Hi all, > > Is it possible to use one vector to find only those closest values in >

[Scilab-users] Extract closest value

2022-06-02 Thread Lester Anderson
Hi all, Is it possible to use one vector to find only those closest values in another vector with a tolerance limit? A=[2 3 4 5 6]; // source array B=[0.25 1.2 2.01 5.2 7.4 9.3 10.6 ]; // target array to find closest values to A So in the example above, the closest values would be 2.01 and 5.2

[Scilab-users] dos function (update)

2022-05-29 Thread Lester Anderson
Hi all, I previously queried an issue with the dos function in Scilab 6.1.1 not working as it should; i.e. dos('grdinfo file.grd') would fail and return F. However, the workaround is the following: [result, bOK]=dos('exit | grdinfo file.grd') This will write the result and return T, but not

Re: [Scilab-users] HDF5 write data to file

2022-05-27 Thread Lester Anderson
save('Test_output.sod','lon','lat','data') Saving the output creates a file composed of the three datasets (lon, lat, data). Plotting the data in Scilab via Sgrayplot(x,y,z) it looks correct, oriented properly and axes of longitude and latitude. Anyone know how to set the correct attributes to get t

[Scilab-users] HDF5 write data to file

2022-05-25 Thread Lester Anderson
Hi all, I just found a useful way of getting netCDF files into Scilab via HDF5 (just found this!): a=h5open('Test_10-FAA.grd'); h5ls(a) // "lat" "dataset" // "lon" "dataset" // "z" "dataset" // "Conventions" "attribute"// "GMT_version"

Re: [Scilab-users] Riemann Zeta update

2022-05-23 Thread Lester Anderson
quot; uses vectorisation to improve speed. Lester On Sun, 22 May 2022 at 07:31, Lester Anderson wrote: > Hi all, > > After a lot of trial and error, I have managed to get a set of functions > to compute the approximations of Riemann's Zeta for negative and positive > real values; value

[Scilab-users] Riemann Zeta update

2022-05-22 Thread Lester Anderson
Hi all, After a lot of trial and error, I have managed to get a set of functions to compute the approximations of Riemann's Zeta for negative and positive real values; values of n > 1e6 seem to give better results: function zs=zeta_s(z, n) // Summation loop zs=1; if z == 0 zs

Re: [Scilab-users] Variable user equation input (2, 3 or more)

2022-05-01 Thread Lester Anderson
As a test, I increased the value n (iterations) and that forced it to converge on the value 150999. Sounds like I need a test of convergence. On Sun, 1 May 2022 at 08:37, Lester Anderson wrote: > Having an issue with the code: > > Tried: x ≡ 2 mod 11; 3 mod 12; 4 mod 13; 5 mod 17;

Re: [Scilab-users] Variable user equation input (2, 3 or more)

2022-05-01 Thread Lester Anderson
input values of a and m, it is not generating M_inv(5), or M_inv(2) (2 equations). I have verified what the results should be in Maxima CAS, [image: image.png] Any ideas what is going wrong? Thanks On Sun, 1 May 2022 at 05:32, Lester Anderson wrote: > Many thanks Samuel > > On Sat, 30

Re: [Scilab-users] Variable user equation input (2, 3 or more)

2022-04-30 Thread Lester Anderson
Sorted the code with multiple equations. Not too sure how to deal with the messagebox list of equations. Still have to do that manually - unless there is a way to automatically build this? Can this multiple text string be done via a for loop to build a list ? Thanks

Re: [Scilab-users] Variable user equation input (2, 3 or more)

2022-04-30 Thread Lester Anderson
for (x): '+string(x)+' mod '+string(M)'], ... 'Solution of 3 congruence equations') On Sat, 30 Apr 2022 at 06:14, Lester Anderson wrote: > Hello all, > > I have a simple code which computes applies the Chinese Remainder theorem > (for a single variable) given

[Scilab-users] Variable user equation input (2, 3 or more)

2022-04-29 Thread Lester Anderson
Hello all, I have a simple code which computes applies the Chinese Remainder theorem (for a single variable) given three input congruence equations to solve for x; not very elegant but it works: My query, is it possible to make this more generalised and vary the number of input equations and

Re: [Scilab-users] Visualising Collatz sequences

2022-04-14 Thread Lester Anderson
Hi Stephane, Many thanks for the code pointers - graphics look fab! Cheers Lester On Thu, 14 Apr 2022 at 15:29, Stéphane Mottelet wrote: > You can also enjoy the 3d version: > > function X=anglePath3(r, th, ph) > cumth = cumsum(th); > cumph = cumsum(ph); > X = cumsum([0

[Scilab-users] Visualising Collatz sequences

2022-04-13 Thread Lester Anderson
Hello all, I have prepared a code to generate Collatz sequences based on the even (n/2) and odd ((3n+1)/2) rules. clear function [ns, seq] = collatz(n) // Reference: https://en.wikipedia.org/wiki/Collatz_conjecture //ns =number of steps; seq=Collatz sequence seq(1) = n; // Position an index on

Re: [Scilab-users] Basic query - mprintf

2022-04-07 Thread Lester Anderson
ot;%d\n", fac')' > > fac = > >"7" "13" "19" > > --> mprintf("%s%s", s, strcat(fac, " ")) > > Factors of 1729 are: 7 13 19 > > > > Regards > > Stefan > > > > > >

[Scilab-users] Basic query - mprintf

2022-04-07 Thread Lester Anderson
Hello all, Very basic query but how do you print all the values from a result via mprintf? e.g. fac = factor(1729) 7 13 19 mprintf('Factors of 1729 are: %d\n', fac) just prints 'Factors of 1729 are: 7 Sorry for the basic question! Cheers Lester ___

Re: [Scilab-users] Cauchy Integral query

2022-01-05 Thread Lester Anderson
the default one, > > we get the expected result: > > > > --> function y=f(z) > >> y = exp((z.^2))./(z-2) > >> endfunction > > > > --> fz=intl(0, 2*%pi, 2, 1, f,1e-10) // gives round-off error > > fz = > > 4.199D-13 + 343.0502

Re: [Scilab-users] Cauchy Integral query

2022-01-05 Thread Lester Anderson
he expected result: > > --> function y=f(z) > > y = exp((z.^2))./(z-2) > > endfunction > > --> fz=intl(0, 2*%pi, 2, 1, f,1e-10) // gives round-off error > fz = >4.199D-13 + 343.05029i > > --> 2*%pi*%i*%e^4 > ans = >0. + 343.05029i > >

[Scilab-users] Cauchy Integral query

2022-01-05 Thread Lester Anderson
Hello, I am trying to understand how to work the Cauchy integral inputs and replicate the results of a published example: .e.g. Compute the integral of e^(z^2) / (z-2) assumes C is closed (anticlockwise) and z=2 is inside C (a simple circle). The solution should be 2*pi*i*f(2) = 2*pi*i*e^4 In

Re: [Scilab-users] Bernoulli numbers calculation

2021-12-30 Thread Lester Anderson
, Samuel Gougeon wrote: > Hello Lester, > > > Le 29/12/2021 à 09:00, Lester Anderson a écrit : > > Hello, > > A quick query. Have adapted existing Matlab code for Scilan to calculate > Bernoulli numbers using an explicit formula (www.bernoulli.org). > > > Not s

[Scilab-users] Bernoulli numbers calculation

2021-12-29 Thread Lester Anderson
Hello, A quick query. Have adapted existing Matlab code for Scilan to calculate Bernoulli numbers using an explicit formula (www.bernoulli.org). The code works fine for numbers from 0 to 10, but 11 onwards the values are incorrect: Not the most efficient code but do need to understand where the

Re: [Scilab-users] Reimann Zeta function

2021-11-29 Thread Lester Anderson
e : > > http://numbers.computation.free.fr/Constants/Miscellaneous/zeta.html > > S. > > Le 29 nov. 2021 à 09:39, Lester Anderson a écrit : > >  > Hello all, > > I am interested in the Reimann Zeta function, but it does not appear as an > option directly with Scilab (v6.

Re: [Scilab-users] Reimann Zeta function

2021-11-29 Thread Lester Anderson
einz Nabielek wrote: > Riemann zeta function ! > > Georg Friedrich Bernhard Riemann (17 September 1826 – 20 July 1866) was a > German mathematician who made contributions to analysis, number theory, and > differential geometry. > > Heinz > > > > > On 29.11.2021, at 09:39,

Re: [Scilab-users] Loop query

2021-08-16 Thread Lester Anderson
This is the simplest option, based on primes(35): [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11]=seq([1:$]); Extract values based on the indices in the seq list. On Mon, 16 Aug 2021 at 10:49, Lester Anderson wrote: > Hi Samuel, > > Further to your method, is there a way to vectorise the li

Re: [Scilab-users] Loop query

2021-08-16 Thread Lester Anderson
Gougeon wrote: > Le 15/08/2021 à 11:28, Lester Anderson a écrit : > > Hello Samuel, > > The size of ns (number of steps) and seq (sequence of values) are variable > depending on the integer input, and this seems to be one issue. > > For this reason, seq must be a list, leading

Re: [Scilab-users] Loop query

2021-08-15 Thread Lester Anderson
Thanks for all the guidance guys! Lester On Sun, 15 Aug 2021 at 15:33, Stefan Du Rietz wrote: > > > On 2021-08-15 15:54, Samuel Gougeon wrote: > > Le 15/08/2021 à 11:28, Lester Anderson a écrit : > >> Hello Samuel, > >> > >> The size of ns (nu

Re: [Scilab-users] Loop query

2021-08-15 Thread Lester Anderson
Hi Stefan, Thank you for clarifying the meaning of the error message. Lester On Sun, 15 Aug 2021 at 11:59, Stefan Du Rietz wrote: > Hello Lester, > the problem is that seq in each loop is a vector of increasing length! > > Stefan > > > On 2021-08-15 12:05, Lester Anderson

Re: [Scilab-users] Loop query

2021-08-15 Thread Lester Anderson
Hi Stefan, I did try that before, but got an error - "Submatrix incorrectly defined" Lester On Sun, 15 Aug 2021 at 10:56, Stefan Du Rietz wrote: > > > On 2021-08-15 09:00, Lester Anderson wrote: > > Hello, > > > > Basic query. I have a simple cod

Re: [Scilab-users] Loop query

2021-08-15 Thread Lester Anderson
2021 at 09:24, Samuel Gougeon wrote: > Le 15/08/2021 à 09:00, Lester Anderson a écrit : > > Hello, > > Basic query. I have a simple code that applies the Collatz conjecture > equation (3n+1) by running a function and then runs a loop over the values > stored in prime (the

[Scilab-users] Loop query

2021-08-15 Thread Lester Anderson
Hello, Basic query. I have a simple code that applies the Collatz conjecture equation (3n+1) by running a function and then runs a loop over the values stored in prime (the first 8 Prime numbers): clear exec('collatz.sci',-1); prime = primes(20); for i = 1:length(prime) [ns,

Re: [Scilab-users] Odd behaviour with dos() function

2021-07-28 Thread Lester Anderson
> On the other hand the expression "single text" is not clear. What is a > "text" in Scilab? Text is meaningless, in Scilab we have strings, and > "single" is somewhat vague. Does it mean a one-component string? > > Your workaround of using a batch ma

[Scilab-users] Odd behaviour with dos() function

2021-07-28 Thread Lester Anderson
Hello all, This has been queried previously without an obvious solution. For example: [output, bOK]=dos('grdinfo Test_10-FAA.grd') Fails with bOK = F Adding 'start grdinfo Test_10-FAA.grd gives bOK=T but now dos window console with the result The only way to get the out put shown below is to

[Scilab-users] Double and triple integral query

2020-01-26 Thread Lester Anderson
Hello all, I have looked at the int2d and int3d commands for double and triple integrals, but was wondering if there was a simple method of defining the input triangles or tetrahedrons (int2d and int3d respectively)? It would be nice to just specify the function, limits and integration

Re: [Scilab-users] Shading and illumination for 3D surfaces

2018-12-09 Thread Lester Anderson
Many thanks Stephane! On 13:03, Sun, 9 Dec 2018 Stéphane Mottelet Yes just type: > > —> help light > > S. > > Le 9 déc. 2018 à 12:10, Lester Anderson a écrit : > > Hi all, > > Just a quick query, but is it possible to apply shading/illumina

[Scilab-users] Shading and illumination for 3D surfaces

2018-12-09 Thread Lester Anderson
Hi all, Just a quick query, but is it possible to apply shading/illumination to 3D surfaces? Lester ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

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

2018-08-13 Thread Lester Anderson
Hi Ekin, Thanks for the update. I will look into the MS visual studio route. Good to know about gcc, at least that can be used for something else. Will let you know how I get on. Cheers Lester On 19:04, Mon, 13 Aug 2018 Ekin Akoglu, wrote: > Dear Lester, > > Yes, Scilab does support GCC but

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

2018-08-03 Thread Lester Anderson
Hi Rafael, Thanks for the pointers, will look into the code further. With reference to the moving Window, I was thinking looping over rows and then the columns, not sure how Scilab works with a scan-line method, but will investigate. Good to learn by trying! Cheers, Lester On 19:34, Fri, 3 Aug

Re: [Scilab-users] Matlab to Scilab code query

2018-07-17 Thread Lester Anderson
Thanks for the clarification, good to know the subtle details. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

[Scilab-users] Matlab to Scilab code query

2018-07-17 Thread Lester Anderson
Hello all, I have a query regarding some code I tweaked to run under Scilab from the original Matlab version (attached both here). Both give the same result for subplot 1 (upper view), but the lower subplot has different results and I cannot see where the difference is occurring. It is just the

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

2018-06-17 Thread Lester Anderson
) Thanks in advance Lester On 17 June 2018 at 07:47, Stéphane Mottelet wrote: > Hello, > > In the Plotlib you have an equivalent function : > > > http://forge.scilab.org/index.php/p/plotlib/source/tree/ > HEAD/tags/0.46/plotlib/macros/surfnorm.sci > > S. > >

[Scilab-users] Compute normals to 3D surface

2018-06-16 Thread Lester Anderson
Hello all, I was wondering if it was possible to compute and visualise the normals to a 3D surface in Scilab? I think Matlab has something called surfnorm;is there something similar for Scilab? I have attached the basic code for the Moebius strip, and it would be useful to showwhat happens to

Re: [Scilab-users] Possible bug: export to JPEG

2018-06-11 Thread Lester Anderson
c card. > Could you try to upgrade (or downgrade) your drivers? > > Hope it helps, > > Antoine > > > Le 11/06/2018 à 09:47, Lester Anderson a écrit : > > Hi all, > > I am using Scilab 6.0.1 and there seems to be an issue with export to JPEG > (low or high resoluti

[Scilab-users] Possible bug: export to JPEG

2018-06-11 Thread Lester Anderson
Hi all, I am using Scilab 6.0.1 and there seems to be an issue with export to JPEG (low or high resolution). See attached low-res image. Tested this using xs2jpg and export figure from the graphic. Other export options seem to be fine, PNG has no problem. Cheers Lester

Re: [Scilab-users] Coding for a 3D Klein Bottle

2018-06-10 Thread Lester Anderson
makes the expected picture: > > This could make a nice demo, in the *Graphics => More surfaces* section. > > Regards > Samuel > > > Le 10/06/2018 à 12:51, Lester Anderson a écrit : > > Hello all, > > I have been testing the latest version of Scilab (6.

[Scilab-users] Coding for a 3D Klein Bottle

2018-06-10 Thread Lester Anderson
Hello all, I have been testing the latest version of Scilab (6.0.1) and have been looking at data visualisation of non-orientatable surfaces (e.g. Moebius, Klein Bottle etc.). The Moebius strip was not hard to figure out, but I am having issues with the Klein Bottle.I have attched the code as is

Re: [Scilab-users] Scilab 6.0.0, read()

2017-02-22 Thread Lester Anderson
dows 10 and 32-bit versions of Scilab: > > Scilab-5.5.2: > > size(mat) = [1 7] > mat took 0.08 sec to read. > size(mat) = [1 7] > > Scilab-6.0.0: > > size(mat) = [1 7] > mat took 39.14 sec to read. > size(mat) = [1 7] > > Regards

Re: [Scilab-users] Scilab 6.0.0, read()

2017-02-22 Thread Lester Anderson
Haven't got as far as testing the functions, but just starting version 6 compared to 5.5.2 is slower; not sure what is going on. Testing on Windows 8.1 (4 Gb RAM). Do you have a test script to try, see if the issue can be reproduced? Cheers Lester On 22 February 2017 at 10:15, Stefan Du Rietz

[Scilab-users] Scilab 6.0.0

2017-02-22 Thread Lester Anderson
Hi all, Just a general query, but has anyone noticed that it takes a lot longer to load Scilab 6 on Windows compared to v5.5.2 (64-bit)? Only installed a little while ago, but 5.5.2 loads really promptly on a laptop with 4 Gb of RAM and a selection of modules starting, whereas version 6 takes a

Re: [Scilab-users] Adding header to cdvwrite output

2016-10-17 Thread Lester Anderson
ail.com> wrote: > Sorry for the quick answer but the help file provides a clear example. > Rgds > > -Original Message- > From: users [mailto:users-boun...@lists.scilab.org] On Behalf Of Lester > Anderson > Sent: Monday, October 17, 2016 11:28 AM > To: I

Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat

2016-10-17 Thread Lester Anderson
Hello, I ran the same code on my machine and actually got worse results: -->exec('Q:\Scilab_code\csvread_write.sce', -1) 1.12.2015.1.15.0.12.1.1 - 2.2 1.12.2015.1.15.0.12.1.1 - 2.2 !01.12.2015 1 15 0.12 1.1 -2.2 ! time1=

[Scilab-users] Input/output of tabulated data

2016-10-14 Thread Lester Anderson
Hello, Quick query. If I have a data file containg three columns e.g. Long Lat gravity 12 2 34.4 20 4 60.3 30 6 23.7 I want to read column 3 (gravity) to process and then write the results back out as: gravity_processed = f(gravity) Long Lat gravity_processed 12 2 g1 20 4 g2 30 6 g3 etc. Is

[Scilab-users] Scilab (5.5.2) and proxy settings

2016-02-16 Thread Lester Anderson
Hello At the moment the only way I can install additional modules is in "offline" mode. Tried all the usual routes for proxy settings but the program will not find the default proxy in place, even though other applications will do (without manually setting the values). Tested with the free GIS

Re: [Scilab-users] Padarray Matlab equivalent in Scilab

2016-02-11 Thread Lester Anderson
Thanks for the update Samuel. Got the padding working as you suggested: clear() data = [1 2 3; 4 5 6; 7 8 9] addedRows = 3; addedCols = 3; tmp = [data ; data($, :) .*. ones(addedRows, 1)]; tmp = [tmp tmp(:, $) .*. ones(1,addedCols)]; tmp = [repmat(tmp(1, : ), addedRows, 1) ; tmp]; paddedMat =

[Scilab-users] Padarray Matlab equivalent in Scilab

2016-02-10 Thread Lester Anderson
Hi all, A quick one. I am looking for the Scilab equivalent to padarray in Matlab. In the Matlab code the line is: datapad = padarray(data, [rdiff cdiff], 'replicate') where cdiff/rdiff are column/row, with the replicate function padding with the values at the borders of "data" The closest I

Re: [Scilab-users] Padarray Matlab equivalent in Scilab

2016-02-10 Thread Lester Anderson
Thanks for the ideas, it kind of solves the need, but pads to left and bottom only: adding 2 cols/rows say to [1 2 3; 4 5 6; 7 8 9] 1 2 3 3 3 4 5 6 6 6 7 8 9 9 9 7 8 9 9 9 7 8 8 9 9 Is it possible to replicate on the top and right edges? (1 2 3) and (1 4 7) Also looked at resize_matrix(data,

Re: [Scilab-users] Hilbert transform query

2016-02-08 Thread Lester Anderson
form column-by-column and row-by-row. That SHOULD > work, and if you do it as matrix operations it should be pretty fast in > Scilab. > > On Fri, 2016-02-05 at 12:52 +, Lester Anderson wrote: >> Hi Serge, >> >> I am working with grid data, so looking for the 2D Hil

[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

[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

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Lester Anderson
the console. > > Regards > Harpreet > > On Fri, Feb 5, 2016 at 3:18 PM, Lester Anderson <arctica1...@gmail.com> > wrote: >> >> Hello all >> >> I am looking to use the sciNetCDF module to work with GMT grid files >> but have some issues. >> >&g

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Lester Anderson
list('r', no_row, 'c', no_column); after that you > can pass the ncwrite command and you have to pass like this > ncwrite(filename, 'Hilb_Hy',Hy) as Hy is a matrix. > > Regards > Harpreet Singh > > On Fri, Feb 5, 2016 at 4:01 PM, Lester Anderson <arctica1...@gmail.com>

Re: [Scilab-users] Hilbert transform query

2016-02-05 Thread Lester Anderson
gt; 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 precise

Re: [Scilab-users] Using Scinetcdf module

2016-02-05 Thread Lester Anderson
ame, 'mat'); > > Simon > > > Le 05/02/2016 12:26, Lester Anderson a écrit : >> >> 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

[Scilab-users] Scilab warning (5.5.2) vector ^ scalar

2016-01-25 Thread Lester Anderson
Hello, I have a quick query realted to the change from 5.4.1 to 5.5.2 (and 6), related to a vector^scalar operation. The basic code runs and plots the curves as needed but generates warnings on running: clear() clc() functions_library = lib('C:\geophys\Lester\SCILAB_work\Functions'); //Finds the

Re: [Scilab-users] Loop query - Scilab 5.5.2

2016-01-18 Thread Lester Anderson
lamda_k = lamda*1000; > flex = > [flex,2*Pb*lamda/((rho_m-rho_fill)*g)*exp(-lamda_k*x).*cos(lamda_k*x)]; > end > plot(x,flex) > > > > Le 18/01/2016 11:50, Lester Anderson a écrit : >> >> Thanks for that pointer. >> >> The plot works but only does

[Scilab-users] Loop query - Scilab 5.5.2

2016-01-18 Thread Lester Anderson
Hello, I am trying to create a loop to plot three curves from an input variable (Te): clear() rho_m = 3330; rho_fill = 2400; g = 9.81; Pb = -1.5e12; v = 0.25; E = 1e11; x=linspace(0,200,41); for Te = 5000:25000:1 // start:end:step to make 5000, 15000, 25000 D = E*Te .^3/(12*(1-v^2));

Re: [Scilab-users] Loop query - Scilab 5.5.2

2016-01-18 Thread Lester Anderson
Thanks for that pointer. The plot works but only does Te=25 in this case for Te = 5000:1:25000 // start: step: end D = E*Te .^3/(12*(1-v^2)); lamda = ((rho_m-rho_fill)*g ./(4*D)).^0.25; lamda_k = lamda*1000; flex =

Re: [Scilab-users] Problem installing modules manually (atomsInstall)

2016-01-15 Thread Lester Anderson
ly after one has cached module list. Thanks On 15 January 2016 at 13:13, <amonm...@laas.fr> wrote: > Le 01/15/2016 01:45 PM, Lester Anderson a écrit : >> >> Hello, >> >> Tried setting the proxy with the settings our IT guy gave in the >> Scilab prefe

Re: [Scilab-users] Problem installing modules manually (atomsInstall)

2016-01-15 Thread Lester Anderson
yUserName") > atomsSetConfig("proxyPassword","myPassword") > > > Read the more documentation below: > https://wiki.scilab.org/ATOMS > > Reagrds, > > Lavita Pereira > > > > On Fri, Jan 15, 2016 at 3:59 PM, Lester Anderson <arctica1...@gmail.co

Re: [Scilab-users] Problem installing modules manually (atomsInstall)

2016-01-15 Thread Lester Anderson
Still not working. On 15 January 2016 at 14:26, Antoine Monmayrant <antoine.monmayr...@laas.fr> wrote: > Le 01/15/2016 03:16 PM, Lester Anderson a écrit : >> >> tried atomsSetConfig('Offline','True') with no change in result > > > That's weird because I found th

Re: [Scilab-users] Problem installing modules manually (atomsInstall)

2016-01-15 Thread Lester Anderson
gt; wrote: > Le 01/15/2016 03:51 PM, Lester Anderson a écrit : >> >> Still not working. > > What's happening? > Is is still trying to connect to the internet? > Did you have the following message when setting the 'offline' to 'True' : > WARNING: Option

Re: [Scilab-users] Problem installing modules manually (atomsInstall)

2016-01-15 Thread Lester Anderson
tried atomsSetConfig('Offline','True') with no change in result As you say Antoine, room for improvement in terms of installing offline for sure. On 15 January 2016 at 13:29, Stéphane Mottelet <stephane.motte...@utc.fr> wrote: > Le 15/01/2016 14:25, Lester Anderson a écrit : >> &

Re: [Scilab-users] Problem installing modules manually (atomsInstall)

2016-01-15 Thread Lester Anderson
there in the end :) I will also let our IT guys know. On 15 January 2016 at 15:49, Antoine Monmayrant <antoine.monmayr...@laas.fr> wrote: > Le 01/15/2016 04:26 PM, Lester Anderson a écrit : >> >> Hi Antoine, >> >> Yes all is set fine: >> >> -->atomsSetCon

Re: [Scilab-users] Problem installing modules manually (atomsInstall)

2016-01-14 Thread Lester Anderson
Just installed v5.5.2 and get the same issue when trying to install a module manually, error 21 at line 170 of atomsInstall Scilab is installed in Program Files on Windows, and so I am guessing that it might be a permissions issue for a work machine? On 13 January 2016 at 08:51, Lester Anderson

[Scilab-users] Problem installing modules manually (atomsInstall)

2016-01-13 Thread Lester Anderson
Hello, I currently have v5.4.1 of Scilab, and have to install modules manually. I am trying to install apifun (as quite a few modules use it), but get this error -->atomsInstall('c:\ss20-work\scilab\apifun_0.4.2-3.bin.zip') !--error 21 Invalid index. at line 170 of function atomsInstall

  1   2   >