Re: [Scilab-users] Compute gradients of grid data

2024-04-05 Thread Lamy Alain
Hello ! One possibility : function [grad_x, grad_y] = compute_gradients(dem) diff_x = diff(dem, 1, 'c'); diff_y = diff(dem, 1, 'r'); grad_x = zeros(dem); grad_x(:, 2 : $-1) = (diff_x(:,1:$-1) + diff_x(:,2:$)) / 2; grad_x(:, 1) = diff_x(:,1); grad_x(:, $) = diff_x(:,$);

Re: [Scilab-users] Plot sequence: Problem only, one colour is white. What is the easiest way to change the colour sequence?

2023-10-30 Thread Lamy Alain
t;black"); a.children(1).children(3).mark_background = color("black"); -----Original Message- From: users On Behalf Of Lamy Alain Sent: lundi 30 octobre 2023 13:04 To: Users mailing list for Scilab Subject: Re: [Scilab-users] Plot sequence: Problem only, one colour is white. What is the

Re: [Scilab-users] Plot sequence: Problem only, one colour is white. What is the easiest way to change the colour sequence?

2023-10-30 Thread Lamy Alain
Hi, I don't see which one is white. But anyway, what you could do is change one or more colors after the plot. You could do something like: a = gca(); // list all colors a.children(1).children(1:9).foreground // change number 3 a.children(1).children(3).foreground = 1 Alain -Original

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

2023-02-22 Thread Lamy Alain
Dear Scilab users / team, Just one opinion among others: That's nice to have new Scilab releases regularly, provided of course that backward compatibility is guaranteed us much as possible, except maybe for major versions. But I don't see the need for changing the versioning convention. For

Re: [Scilab-users] fmincon toolbox update

2021-06-07 Thread Lamy Alain
apifun is in fact loaded through atoms. fmincon and sci_ipopt are loaded manually (exec(xxx..sce)) using the binary zip files. (I have just run some examples so far) ___ users mailing list users@lists.scilab.org

Re: [Scilab-users] fmincon toolbox update

2021-06-07 Thread Lamy Alain
Hi, Yes I have successfully installed sci_ipopt and fmincon on Windows (but not using atoms). Alain ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users

Re: [Scilab-users] %mlistType_clear overloading of clear() for mlist custom types

2020-07-01 Thread Lamy Alain
Hello Samuel, Comparing with the example in the « clear » page, the “%test_clear” function must have one argument : --> m = mlist("test"); --> function %test_clear(x) > disp("mlist test cleared") > endfunction --> clear m; "mlist test cleared" Alain

Re: [Scilab-users] Generating a boolean vector or matrix

2019-09-05 Thread Lamy Alain
What I didn’t like at first is to use “ones” for a boolean type. (although I know the 2 types are almost interchangeable in Scilab). The existing function bool2s changes %t into 1. So thinking about it a little more, OK for the proposed extensions of “ones” and “zeros”. Alain

Re: [Scilab-users] feedback on removing 1 row and 1 column

2019-04-30 Thread Lamy Alain
Hi, >>@Samuel: I think we already have something similar signaled in Bugzilla I think the bug is this one: https://bugzilla.scilab.org/show_bug.cgi?id=15087 Alain ___ users mailing list users@lists.scilab.org

Re: [Scilab-users] MinGW makes my Scilab session very unstable (crashs)

2019-04-03 Thread Lamy Alain
Hi Samuel, I use the same version of MinGW (0.10.5) on Windows and I never noticed anything wrong. The only difference with you could be the way MinGW is loaded : for me it’s not through ATOMS but simply by executing : exec("…\mingw_0.10.5\loader.sce") in Scilab.ini file. Alain From: users

Re: [Scilab-users] {EXT} Handling of special characters like °

2017-05-29 Thread Lamy Alain
Hi, I stumbled upon the same oddity recently. I also think that some improvement is necessary. Suggestions (for discussion): ascii(string) => array of size 1xN (N = length(string)), or "ERROR" if the string contains extended characters. ascii(string, option="ext") => array of size pxN,

Re: [Scilab-users] simple plot function

2017-04-03 Thread Lamy Alain
You could use xstring or xnumb: x=0:0.1:1; y=exp((x.^4+x.^2-x+(5).^(0.5))/5)+sinh((x.^3+21*x+9)./(21*x+6))-3.0; scf(); plot(x,y); num = 1 : size(x, "*"); xnumb(x, y, num); // or: xstring(x, y, string(num)); // plus optionally: a = gca(); a.data_bounds = [-0.1, -0.1; 1.1, 0.75]; a.tight_limits

Re: [Scilab-users] simple plot function

2017-03-27 Thread Lamy Alain
Hello, It’s just because a “.” was missing. Alain x=0:0.05:1; y=exp((x.^4+x.^2-x+(5).^(0.5))/5)+sinh((x.^3+21*x+9) ./ (21*x+6))-3.0; plot(x,y) [cid:image001.png@01D2A704.DB333640] ___ users mailing list users@lists.scilab.org

Re: [Scilab-users] MinGw toolbox 0.10.0 is not compatible with Scilab 6.0

2017-02-20 Thread Lamy Alain
Hello ! I had the same problem. The work-around is to copy the “scripts” directory (in MinGW home directory) in “macros”. I already opened a ticket about this point. Alain De : users [mailto:users-boun...@lists.scilab.org] De la part de Nikolay Strelkov Envoyé : samedi 18 février 2017 18:55

Re: [Scilab-users] (no subject)

2014-04-21 Thread Lamy Alain
Hi, The start-up file (I presume scilab.ini under Windows) resides in the directory whose name is effectively given by SCIHOME. But it does not exist by default: you have to create it. That's probably why you cannot find it. ___ users mailing list

Re: [Scilab-users] problème fonction CL_deg2rad

2012-12-12 Thread Lamy Alain
Hi, About the initial question : The solution is probably: CL_init() which creates various local variables including %CL_deg2rad. You can also add the line CL_init(); in the scilab.ini file so that the variables exist each time you start Scilab. (type SCIHOME for the directory where this

Re: [Scilab-users] Changing elements of global structure/vector in function

2012-11-30 Thread Lamy Alain
Correction of typo in my previous answer: ... that all variables in a function should either be local OR declared in some way ... (the initial text may have been difficult to understand) ___ users mailing list users@lists.scilab.org

[Scilab-users] Changing elements of global structure/vector in function

2012-11-29 Thread Lamy Alain
Changing elements of a global (i.e. visible) variable in a function may be dangerous. A new structure or vector is created that only contains the elements that have been changed. I would expect the whole structure/vector to be copied locally before changing part of them. A workaround is to

[Scilab-users] Changing elements of global structure/vector in function

2012-11-29 Thread Lamy Alain
Changing elements of a global (i.e. visible) variable in a function may be dangerous. A new structure or vector is created that only contains the elements that have been changed. I would expect the whole structure/vector to be copied locally before changing part of them. A workaround is to