From brantosaurus at hotmail.com Mon Jan 6 19:14:40 2020 From: brantosaurus at hotmail.com (David Brant) Date: Mon, 6 Jan 2020 11:14:40 -0700 (MST) Subject: [Scilab-users] Help with Jacobian call to Optim Message-ID: <1578334480878-0.post@n3.nabble.com> Hi, i am having problems with the below code. It is a variation of an example listed in the optimization chapter of the Modelling and Simuation in Scilab-Scicos book (pages 109-110 &114). I can configure the code to work for leastsq and lsqrsolve, but not optim. Any advice on mods would be very much appreciated. Regards, Dave Code: function z=fun(p) z=DAT(:,2)-p(1)*exp(p(2)*DAT(:,1))-p(3)*ones(DAT(:,1)) endfunction function dz=dfun(p) var=exp(p(2)*DAT(:,1)) dz=[-var.. -p(1)*DAT(:,1).*var.. -ones(var)] endfunction function [f,g,ind]=costf(p,ind) f=fun(p); g=dfun(p) endfunction DAT=[0 0;0 1;1 1;2 1.5;2 2] p0=[0 0 0]; [fopt,popt]=optim(costf,p0) [fopt,popt,gopt]=optim(list(NDcost,fun),p0') Rsponse: !--error 98 Variable returned by scilab argument function is incorrect. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From p.muehlmann at gmail.com Tue Jan 7 20:41:29 2020 From: p.muehlmann at gmail.com (P M) Date: Tue, 7 Jan 2020 20:41:29 +0100 Subject: [Scilab-users] correctly applying A-weighting onto sound (dB-to-dBA) Message-ID: Dear All, for a simulation temperatures shall be converted into a sound. E.g.: Each temperature value represents a frequency. Low temperatures = low frequency High temperature = high frequency. For creating the sound I use following approach: - create empty array, that will represent the final sound file - insert at the correct position(s) the corresponding frequencies (that represent a dedicated temp-value) - save the - now completely filled - array using: savewave() I assume, that all frequencies are saved with the same amplitude. Since different frequencies are recognized differently by the human ear, some frequencies will appear louder than others. To take care of this, I would like to apply the A-weighting curve onto the sound. How could this be done in Scilab? Thank you, Philipp -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Wed Jan 8 00:41:51 2020 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Wed, 08 Jan 2020 07:41:51 +0800 Subject: [Scilab-users] =?utf-8?q?=C2=A0_correctly_applying_A-weighting_on?= =?utf-8?q?to_sound_=28dB-to-dBA=29?= In-Reply-To: References: Message-ID: <16f8262ceeb.fe7ddf3879515.7669004057671170661@bytecode-asia.com> Your current audio is frequency modulated signal, and applying weighting similar to amplitude modulation.? Theoretically? you could try having a same size vector with your current file, and fill it with the weighting value according to your scaling you want,? and just multiply them, y = a.*b where a is the weighting array, b is ur current audio. Beware of saturation, and also the fact that man and woman might hear different frequencies differently. ? Thx CL ---- On Wed, 08 Jan 2020 03:41:29 +0800 p.muehlmann at gmail.com wrote ---- Dear All, for a simulation temperatures shall be converted into a sound. E.g.: Each temperature value represents a frequency. Low temperatures = low frequency High temperature = high frequency. For creating the sound I use following approach: ? - create empty array, that will represent the final sound file ? - insert at the correct position(s) the corresponding frequencies (that represent a dedicated temp-value) ?- save the - now completely filled - array using: savewave() ?I assume, that all frequencies are saved with the same amplitude. Since different frequencies are recognized differently by the human ear, some frequencies will appear louder than others. To take care of this, I would like to apply the A-weighting curve onto the sound. How could this be done in Scilab? Thank you, Philipp _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Wed Jan 8 08:57:19 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Wed, 8 Jan 2020 07:57:19 +0000 Subject: [Scilab-users] {EXT} Help with Jacobian call to Optim In-Reply-To: <1578334480878-0.post@n3.nabble.com> References: <1578334480878-0.post@n3.nabble.com> Message-ID: Hello, > De : David Brant > Envoy? : lundi 6 janvier 2020 19:15 > > Rsponse: > !--error 98 > Variable returned by scilab argument function is incorrect. I personally have the following error: costf: Wrong type for output argument #1: Real scalar expected. If I understand well, fun() returns a 5 ? 1 matrix which is probably the problem. Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From stephane.mottelet at utc.fr Wed Jan 8 13:41:05 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 8 Jan 2020 13:41:05 +0100 Subject: [Scilab-users] Help with Jacobian call to Optim In-Reply-To: <1578334480878-0.post@n3.nabble.com> References: <1578334480878-0.post@n3.nabble.com> Message-ID: <1879be07-3745-3858-6ce8-538f72b01773@utc.fr> Hello, If you want to use optim for your least squares problem you have to consider the minimization of norm(fun(p))^2, which gradient is 2*dfun(p)'*fun(p), i.e. costf must be written like this: function [f,g,ind]=costf(p,ind) ??? f=norm(fun(p))^2; ??? g=2*dfun(p)'*fun(p); endfunction After this modification you should obtain: --> [fopt,popt,gopt]=optim(costf,p0) ?gopt? = ? -1.563D-14? -2.598D-14? -8.216D-15 ?popt? = ?? 1.?? 0.4054651? -0.5 ?fopt? = ?? 0.3125 S. Le 06/01/2020 ? 19:14, David Brant a ?crit?: > Hi, i am having problems with the below code. > > It is a variation of an example listed in the optimization chapter of the > Modelling and Simuation in Scilab-Scicos book (pages 109-110 &114). I can > configure the code to work for leastsq and lsqrsolve, but not optim. Any > advice on mods would be very much appreciated. Regards, Dave > > Code: > function z=fun(p) > z=DAT(:,2)-p(1)*exp(p(2)*DAT(:,1))-p(3)*ones(DAT(:,1)) > endfunction > function dz=dfun(p) > var=exp(p(2)*DAT(:,1)) > dz=[-var.. > -p(1)*DAT(:,1).*var.. > -ones(var)] > endfunction > function [f,g,ind]=costf(p,ind) > f=fun(p); g=dfun(p) > endfunction > DAT=[0 0;0 1;1 1;2 1.5;2 2] > p0=[0 0 0]; > [fopt,popt]=optim(costf,p0) > [fopt,popt,gopt]=optim(list(NDcost,fun),p0') > > Rsponse: > !--error 98 > Variable returned by scilab argument function is incorrect. > > > > -- > Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From brantosaurus at hotmail.com Wed Jan 8 16:44:45 2020 From: brantosaurus at hotmail.com (David Brant) Date: Wed, 8 Jan 2020 08:44:45 -0700 (MST) Subject: [Scilab-users] Help with Jacobian call to Optim In-Reply-To: <1879be07-3745-3858-6ce8-538f72b01773@utc.fr> References: <1578334480878-0.post@n3.nabble.com> <1879be07-3745-3858-6ce8-538f72b01773@utc.fr> Message-ID: <1578498285759-0.post@n3.nabble.com> Many thanks St?phane. Is it also possible to do this if the gradient is not known or impractical to obtain using NDcost as i had intended with something like [fopt,popt,gopt]=optim(list(NDcost,fun),p0') ? Regards, Dave -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From brantosaurus at hotmail.com Wed Jan 8 16:45:30 2020 From: brantosaurus at hotmail.com (David Brant) Date: Wed, 8 Jan 2020 08:45:30 -0700 (MST) Subject: [Scilab-users] Help with Jacobian call to Optim In-Reply-To: <1879be07-3745-3858-6ce8-538f72b01773@utc.fr> References: <1578334480878-0.post@n3.nabble.com> <1879be07-3745-3858-6ce8-538f72b01773@utc.fr> Message-ID: <1578498330586-0.post@n3.nabble.com> Many thanks St?phane. Is it also possible to do this if the gradient is not known or impractical to obtain using NDcost as i had intended with something like [fopt,popt,gopt]=optim(list(NDcost,fun),p0') ? Regards, Dave -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From stephane.mottelet at utc.fr Wed Jan 8 16:53:34 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Wed, 8 Jan 2020 16:53:34 +0100 Subject: [Scilab-users] Help with Jacobian call to Optim In-Reply-To: <1578498330586-0.post@n3.nabble.com> References: <1578334480878-0.post@n3.nabble.com> <1879be07-3745-3858-6ce8-538f72b01773@utc.fr> <1578498330586-0.post@n3.nabble.com> Message-ID: There is no added value when using NDcost, you can directly use numderivative like this function [f,g,ind]=costf(p,ind) ??? f=norm(fun(p))^2; ??? g=2*numderivative(fun,p)'*fun(p); endfunction S. Le 08/01/2020 ? 16:45, David Brant a ?crit?: > Many thanks St?phane. > > Is it also possible to do this if the gradient is not known or impractical > to obtain using NDcost as i had intended with something like > > [fopt,popt,gopt]=optim(list(NDcost,fun),p0') ? > > Regards, Dave > > > > -- > Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Wed Jan 8 19:30:13 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Wed, 8 Jan 2020 19:30:13 +0100 Subject: [Scilab-users] About legend instruction in graphics Message-ID: Hello, When drawing scope X(t) with multiple chanels, is there a way to get a horizontal legend to maximalize the graphic area (as matlab does) All proposal for the legend positionning reduce the graphic area (vertical display with box or no box) 1. Legend are into the graphic. Some curves are not visible 2. Legend are out of graphic, but reduces the graphic area. Best Regards Pierre P. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 3479 bytes Desc: not available URL: From sgougeon at free.fr Wed Jan 8 20:12:34 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 8 Jan 2020 20:12:34 +0100 Subject: [Scilab-users] About legend instruction in graphics In-Reply-To: References: Message-ID: <7e485d14-fe9a-a6f6-1cbf-9b60368b5a90@free.fr> Hello, Le 08/01/2020 ? 19:30, Perrichon a ?crit?: > > Hello, > > When drawing scope X(t) with multiple chanels, is there a way to get a > horizontal legend to maximalize the graphic area (as matlab does) > > All proposal for the legend positionning reduce the graphic area > (vertical display with box or no box) > > 1. Legend are into the graphic. Some curves are not visible > 2. Legend are out of graphic, but reduces the graphic area. > > Best Regards > > Pierre P. > legend_mc() aims to do that: https://fileexchange.scilab.org/toolboxes/274000 --> legends_mc function [] = legends_mc(Texts,Styles,Lpc,font_size,thickness,pos,framed?) ?For many curves & related legends, displays a multicolumn bloc of legends: ? - The shape of the bloc can be specified (Lpc) ? - Positionning with Logarithmic or/and reversed axes is supported ? - Lines styles and Markers styles are supported and can be mixed. ??? A set of polyline handles or having polyline children can be ??? alternatively provided ? - Lines thickness(es) can be specified (ignored if handles are ??? given: read out from the polylines properties) ?HELP: run legends_mc() without any parameter ?DEMO: run legends_mc(..) without specifying Texts ?Texts? : vector of legends ?Styles : a) vector of related lines or markers styles (integer indices) ????????? Styles(i)>0 -> line color (only solid style supported) ????????? -14<= Styles(i) <=0 -> marker (overlay with line unsupported) ???????? b) (2,n) matrix: ???????????? Styles(1,:) = as in a) ???????????? Styles(2,:) = line style, or color of marker ???????? c) vector of graphical handles. Then all Polyline children ??????????? are searched (in chronological order of creation). ??????????? Texts must have as many entries as there are available ??????????? polylines. ??????????? If only 1 handle is given and is an axes, the legends is ??????????? set in this axes. When returning, the focus is restored ??????????? to the axes priorly active. ??????????? If a set of handles or an handle not being an axes is given, ??????????? the legends are set in the currently active axes. ???????? Default Styles : gca() ?Lpc>0 :? (maximal) number of Lines Per Column (integer) ?Lpc<0 : -(maximal) number of Columns per line (integer) ?framed? : boolean: if %T, draws the global box of legends (default) ?pos : position of the block: ????? "ur" | 1 : in the upper right corner (default) ????? "ul" | 2 : in the upper left corner ????? "ll" | 3 : in the lower left corner ????? "lr" | 4 : in the lower right corner ????? "?"? | 5 : interactive positionning with the mouse ????? [xr,yr]: relative coordinates 0 <= xr,yr <= 1 of the upper left ???????? corner of the block, with respect to the upper left corner ???????? of the data bounds area. [0,0] is equivalent to "ul" ?thickness: scalar or vector of lines thickness. ??????????? If a vector is provided, its length must = Styles one. ??????????? If styles are from handles, thickness vector is ignored. ?DEMOS: run legends_mc(..) without Texts of legends: ?? clf, legends_mc( framed?=%f ) ?? clf, legends_mc( Lpc=7, pos="?" ) ?? clf, legends_mc( Lpc=-3, pos="lr" ) ?? clf, legends_mc( Lpc=-2, pos=[0.15 0.3] ) ?? clf, legends_mc( font_size=2, pos="ll" ) ?? clf, legends_mc( pos="?", thickness=2 ) ?? clf, legends_mc( pos="lr", thickness=1+round(rand(1:19)) ) ?? clf, plot2d(), legends_mc( Lpc=-3, pos="ll" ) ?? clf, plot(), f=gcf(); legends_mc(Styles=f.children($), pos="?") ?EXAMPLE: ?? clf, plot2d(), legends_mc("line #"+string(1:3), Lpc=-3, pos="?" ) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 3479 bytes Desc: not available URL: From brantosaurus at hotmail.com Thu Jan 9 22:32:31 2020 From: brantosaurus at hotmail.com (David Brant) Date: Thu, 9 Jan 2020 14:32:31 -0700 (MST) Subject: [Scilab-users] Least squares problem call to fmincon - HELP Message-ID: <1578605551155-0.post@n3.nabble.com> How may i (if possible?) reconfigure the least-squares problem to be solved with a minimalist call to fmincon (from the fossee toolbox)? I tried everything, but must be (seriously?) overlooking something! Perhaps something like: function z=fun(p) z=DAT(:,2)-p(1)*exp(p(2)*DAT(:,1))-p(3)*ones(DAT(:,1)) endfunction function dz=dfun(p) var=exp(p(2)*DAT(:,1)) dz=[-var.. -p(1)*DAT(:,1).*var.. -ones(var)] endfunction //function [f,g,ind]=costf(p,ind) // f=fun(p); g=dfun(p) //endfunction function [f,g,ind]=costf(p,ind) f=norm(fun(p))^2; // g=2*dfun(p)'*fun(p); g=2*numderivative(fun,p)'*fun(p); endfunction DAT=[0 0;0 1;1 1;2 1.5;2 2]; p0=[0 0 0]; A=[]; b=[]; [popt,fopt]=fmincon(costf,p0,A,b); disp(popt,'popt',fopt,'fopt'); fmincon.sce Dave -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From stephane.mottelet at utc.fr Fri Jan 10 10:20:08 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 10 Jan 2020 10:20:08 +0100 Subject: [Scilab-users] Least squares problem call to fmincon - HELP In-Reply-To: <1578605551155-0.post@n3.nabble.com> References: <1578605551155-0.post@n3.nabble.com> Message-ID: <2ece8a25-69d2-80d9-d522-842cf4173813@utc.fr> Le 09/01/2020 ? 22:32, David Brant a ?crit?: > How may i (if possible?) reconfigure the least-squares problem to be solved > with a minimalist call to fmincon (from the fossee toolbox)? > > I tried everything, but must be (seriously?) overlooking something! Perhaps > something like: > > function z=fun(p) > z=DAT(:,2)-p(1)*exp(p(2)*DAT(:,1))-p(3)*ones(DAT(:,1)) > endfunction > > function dz=dfun(p) > var=exp(p(2)*DAT(:,1)) > dz=[-var.. > -p(1)*DAT(:,1).*var.. > -ones(var)] > endfunction > > //function [f,g,ind]=costf(p,ind) > // f=fun(p); g=dfun(p) > //endfunction > > function [f,g,ind]=costf(p,ind) > f=norm(fun(p))^2; > // g=2*dfun(p)'*fun(p); > g=2*numderivative(fun,p)'*fun(p); > endfunction > > DAT=[0 0;0 1;1 1;2 1.5;2 2]; > p0=[0 0 0]; > A=[]; b=[]; > > [popt,fopt]=fmincon(costf,p0,A,b); > disp(popt,'popt',fopt,'fopt'); > fmincon.sce > Dave By default, fmincon expects costf to return only the objective function. Hence you should define it like this function f=costf(p) f = norm(fun(p))^2; endfunction There is a way to provide the exact gradient of f, as described here: https://scilab.in/fossee-scilab-toolbox/optimization-toolbox/functions/fmincon function g = grad(p) g = 2*dfun(p)'*fun(p); endfunction options = list("GradObj",grad) xopt= fmincon(f,x0,A,b,[],[],[],[],[],options) S. > > > > -- > Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Fri Jan 10 12:30:13 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Fri, 10 Jan 2020 12:30:13 +0100 Subject: [Scilab-users] About legend instruction in graphics - Message-ID: Hello, Samuel?s ? legends_mc ? is a very nice instruction. It does exactly what I wanted xLeg=0.; yLeg=1.04; Xlegend=["CVitesse";"Vitesse";"Vannage";"D?bit";"Chute";"Puissance"] legends_mc(Xlegend, Lpc=-10, framed?=%f, pos=[xLeg yLeg]) Other case Xlegend=["Cons.Vitesse";'Vitesse filtr?e';"D?riv?e";"Int?grale";"Lim. Ouverture";"Cons. Vannage CVA";"Cons. charge CC"] legends_mc(Xlegend, Lpc=2, framed?=%f, pos=[xLeg yLeg]) : Best regard Pierre P. De : users De la part de Samuel Gougeon Envoy? : mercredi 8 janvier 2020 20:13 ? : users at lists.scilab.org Objet : Re: [Scilab-users] About legend instruction in graphics Hello, Le 08/01/2020 ? 19:30, Perrichon a ?crit : Hello, When drawing scope X(t) with multiple chanels, is there a way to get a horizontal legend to maximalize the graphic area (as matlab does) All proposal for the legend positionning reduce the graphic area (vertical display with box or no box) 1. Legend are into the graphic. Some curves are not visible 2. Legend are out of graphic, but reduces the graphic area. Best Regards Pierre P. legend_mc() aims to do that: https://fileexchange.scilab.org/toolboxes/274000 --> legends_mc function [] = legends_mc(Texts,Styles,Lpc,font_size,thickness,pos,framed?) For many curves & related legends, displays a multicolumn bloc of legends: - The shape of the bloc can be specified (Lpc) - Positionning with Logarithmic or/and reversed axes is supported - Lines styles and Markers styles are supported and can be mixed. A set of polyline handles or having polyline children can be alternatively provided - Lines thickness(es) can be specified (ignored if handles are given: read out from the polylines properties) HELP: run legends_mc() without any parameter DEMO: run legends_mc(..) without specifying Texts Texts : vector of legends Styles : a) vector of related lines or markers styles (integer indices) Styles(i)>0 -> line color (only solid style supported) -14<= Styles(i) <=0 -> marker (overlay with line unsupported) b) (2,n) matrix: Styles(1,:) = as in a) Styles(2,:) = line style, or color of marker c) vector of graphical handles. Then all Polyline children are searched (in chronological order of creation). Texts must have as many entries as there are available polylines. If only 1 handle is given and is an axes, the legends is set in this axes. When returning, the focus is restored to the axes priorly active. If a set of handles or an handle not being an axes is given, the legends are set in the currently active axes. Default Styles : gca() Lpc>0 : (maximal) number of Lines Per Column (integer) Lpc<0 : -(maximal) number of Columns per line (integer) framed? : boolean: if %T, draws the global box of legends (default) pos : position of the block: "ur" | 1 : in the upper right corner (default) "ul" | 2 : in the upper left corner "ll" | 3 : in the lower left corner "lr" | 4 : in the lower right corner "?" | 5 : interactive positionning with the mouse [xr,yr]: relative coordinates 0 <= xr,yr <= 1 of the upper left corner of the block, with respect to the upper left corner of the data bounds area. [0,0] is equivalent to "ul" thickness: scalar or vector of lines thickness. If a vector is provided, its length must = Styles one. If styles are from handles, thickness vector is ignored. DEMOS: run legends_mc(..) without Texts of legends: clf, legends_mc( framed?=%f ) clf, legends_mc( Lpc=7, pos="?" ) clf, legends_mc( Lpc=-3, pos="lr" ) clf, legends_mc( Lpc=-2, pos=[0.15 0.3] ) clf, legends_mc( font_size=2, pos="ll" ) clf, legends_mc( pos="?", thickness=2 ) clf, legends_mc( pos="lr", thickness=1+round(rand(1:19)) ) clf, plot2d(), legends_mc( Lpc=-3, pos="ll" ) clf, plot(), f=gcf(); legends_mc(Styles=f.children($), pos="?") EXAMPLE: clf, plot2d(), legends_mc("line #"+string(1:3), Lpc=-3, pos="?" ) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 7872 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 8905 bytes Desc: not available URL: From brantosaurus at hotmail.com Fri Jan 10 15:25:02 2020 From: brantosaurus at hotmail.com (David Brant) Date: Fri, 10 Jan 2020 07:25:02 -0700 (MST) Subject: [Scilab-users] Least squares problem call to fmincon - HELP In-Reply-To: <2ece8a25-69d2-80d9-d522-842cf4173813@utc.fr> References: <1578605551155-0.post@n3.nabble.com> <2ece8a25-69d2-80d9-d522-842cf4173813@utc.fr> Message-ID: <1578666302351-0.post@n3.nabble.com> Many thanks for getting back St?phane. I tried your suggestion with the gradient option, but got a problem: !--error 26 Too complex recursion! (recursion tables are full) at line 2 of function fun called by : at line 2 of function fGrad called by : sample_fGrad=fGrad(x0) at line 649 of exec file called by : init=fun(x0) The minimalist call also returned a problem: y=numderivative(fun,x) !--error 4 Undefined variable: 10000000000000G*1000100 at line 29 of function flag1 called by : at line 16 of function fGrad1 called by : init=fun(x0) at line 842 of exec file called by : API Error: in error: bad call to getVarAddressFromPosition! (1rst argument). Probably a stupid error on my part, but cannot spot it! Code: function z=fun(p) z=DAT(:,2)-p(1)*exp(p(2)*DAT(:,1))-p(3)*ones(DAT(:,1)) endfunction //function dz=dfun(p) // var=exp(p(2)*DAT(:,1)) // dz=[-var.. // -p(1)*DAT(:,1).*var.. // -ones(var)] //endfunction function f=costf(p) f = norm(fun(p))^2; endfunction //function g=grad(p) // g = 2*dfun(p)'*fun(p); //endfunction DAT=[0 0;0 1;1 1;2 1.5;2 2]; p0=[0 0 0]; xopt = fmincon(costf,p0,[],[]) //options = list("GradObj",grad) //xopt = fmincon(costf,p0,[],[],[],[],[],[],[],options) fmincon.sce -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From stephane.mottelet at utc.fr Fri Jan 10 15:32:51 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Fri, 10 Jan 2020 15:32:51 +0100 Subject: [Scilab-users] Least squares problem call to fmincon - HELP In-Reply-To: <1578666302351-0.post@n3.nabble.com> References: <1578605551155-0.post@n3.nabble.com> <2ece8a25-69d2-80d9-d522-842cf4173813@utc.fr> <1578666302351-0.post@n3.nabble.com> Message-ID: Did you try one of the examples provided in the help page of fmincon (as a sanity test of FOT) ? I don't see any stupid error in your code. S. Le 10/01/2020 ? 15:25, David Brant a ?crit?: > Many thanks for getting back St?phane. I tried your suggestion with the > gradient option, but got a problem: > > !--error 26 > Too complex recursion! (recursion tables are full) > at line 2 of function fun called by : > at line 2 of function fGrad called by : > sample_fGrad=fGrad(x0) > at line 649 of exec file called by : > init=fun(x0) > > The minimalist call also returned a problem: > > y=numderivative(fun,x) > !--error 4 > Undefined variable: 10000000000000G*1000100 > at line 29 of function flag1 called by : > at line 16 of function fGrad1 called by : > init=fun(x0) > at line 842 of exec file called by : > API Error: > in error: bad call to getVarAddressFromPosition! (1rst argument). > > Probably a stupid error on my part, but cannot spot it! > > Code: > function z=fun(p) > z=DAT(:,2)-p(1)*exp(p(2)*DAT(:,1))-p(3)*ones(DAT(:,1)) > endfunction > > //function dz=dfun(p) > // var=exp(p(2)*DAT(:,1)) > // dz=[-var.. > // -p(1)*DAT(:,1).*var.. > // -ones(var)] > //endfunction > > function f=costf(p) > f = norm(fun(p))^2; > endfunction > > //function g=grad(p) > // g = 2*dfun(p)'*fun(p); > //endfunction > > DAT=[0 0;0 1;1 1;2 1.5;2 2]; > p0=[0 0 0]; > > xopt = fmincon(costf,p0,[],[]) > > //options = list("GradObj",grad) > //xopt = fmincon(costf,p0,[],[],[],[],[],[],[],options) > > fmincon.sce > > > > -- > Sent from: https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From brantosaurus at hotmail.com Fri Jan 10 16:45:24 2020 From: brantosaurus at hotmail.com (David Brant) Date: Fri, 10 Jan 2020 08:45:24 -0700 (MST) Subject: [Scilab-users] Least squares problem call to fmincon - HELP In-Reply-To: References: <1578605551155-0.post@n3.nabble.com> <2ece8a25-69d2-80d9-d522-842cf4173813@utc.fr> <1578666302351-0.post@n3.nabble.com> Message-ID: <1578671124477-0.post@n3.nabble.com> Yes, i have run all 7 examples in 'documentation' and the spring & circular tank design problems in the 'examples' without issue. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From akhorshidi at live.com Tue Jan 14 11:30:17 2020 From: akhorshidi at live.com (A Khorshidi) Date: Tue, 14 Jan 2020 03:30:17 -0700 (MST) Subject: [Scilab-users] Modeling and simulation in Engineering using Modelica Message-ID: <1578997817920-0.post@n3.nabble.com> Hi all This is a scarce MOOC for anyone interesting in object-oriented modeling using open Modelica as well as Scilab Coselica Toolbox. Join here: https://iedra.uned.es/courses/course-v1:UNED+Modelsimul_02+2020_T1/about The class will be started tomorrow. HTH -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From perrichon.pierre at wanadoo.fr Tue Jan 14 18:33:10 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Tue, 14 Jan 2020 18:33:10 +0100 Subject: [Scilab-users] BUG legends_mc with xsave and xload Message-ID: Hello, Hello Samuel, It seems that it is not possible to correctly record or to restaure a graph using < legends_scm > with < xsave > and < xload > Structures of the graph are not respected and illegible. If the bug is not corrected, I'll will be obliged to go back with the < legend > instruction Sincerely How to reproduce the bugg : scf(1) clf, plot2d(), legends_mc('line #'+string(1:3), Lpc=-1, pos="ul" ) // classic xsave("foo.scg", gcf()) scf(2) xload("foo.scg") -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Jan 14 21:07:56 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 14 Jan 2020 21:07:56 +0100 Subject: [Scilab-users] BUG legends_mc with xsave and xload In-Reply-To: References: Message-ID: <5ec21f21-a83f-7433-613e-03aab959bb19@free.fr> Hello Pierre, Le 14/01/2020 ? 18:33, Perrichon a ?crit?: > > Hello, Hello Samuel, > > It seems that it is not possible to correctly record or to restaure a > graph using ??legends_scm?? with ??xsave?? and ??xload?? > > Structures of the graph are not respected and illegible. > > If the bug is not corrected, I?ll will be obliged to go back with the > ??legend?? instruction > > Sincerely > > How to reproduce the bugg?: > > scf(1) > > clf, plot2d(), legends_mc('line #'+string(1:3), Lpc=-1, pos="ul" ) // > classic > > xsave("foo.scg", gcf()) > > scf(2) > > xload("foo.scg") > I am not able to reproduce any issue when running this code with Scilab 6.0.2 on Windows 7. The initial legend is recovered with the whole figure. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Tue Jan 14 22:40:07 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 14 Jan 2020 18:40:07 -0300 Subject: [Scilab-users] range of colon Message-ID: <97d5ab0a-65ed-132a-4a47-294ceba3274f@fceia.unr.edu.ar> Dear all, I need to zero-pad the columns of an N-D array x to a length N. I've found the following solution: siz = size(x); a = repmat(0,[N, siz(2:$)]);???? // Create array of 0's whose columns have length N ???????????????????????????????? // and the remaining dimensions are the same as in x a(1:siz(1), :) = x;????????????? // Replace non-padding 0's by x This seems to work. However, I'm concerned about the use of the last : as a replacemant for all the remaining dimensions, since I couldn't find it documented. Is it an intended behviour? Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Jan 15 01:35:50 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 15 Jan 2020 01:35:50 +0100 Subject: [Scilab-users] range of colon In-Reply-To: <97d5ab0a-65ed-132a-4a47-294ceba3274f@fceia.unr.edu.ar> References: <97d5ab0a-65ed-132a-4a47-294ceba3274f@fceia.unr.edu.ar> Message-ID: Le 14/01/2020 ? 22:40, Federico Miyara a ?crit?: > > Dear all, > > I need to zero-pad the columns of an N-D array x to a length N. I've > found the following solution: > > siz = size(x); > a = repmat(0,[N, siz(2:$)]);???? // Create array of 0's whose columns > have length N > ???????????????????????????????? // and the remaining dimensions are > the same as in x > a(1:siz(1), :) = x;????????????? // Replace non-padding 0's by x > > > This seems to work. Really?: --> x = rand(3,4,2); --> N= 5; --> siz = size(x); --> a = repmat(0,[N, siz(2:$)]);???? // Create array of 0's whose columns have length N --> a(1:siz(1), :) = x Submatrix incorrectly defined. Why not using resize_matrix()? s = size(a); x = resize_matrix(x,[N, s(2:$)]); --> resize_matrix(x,[N s(2:$)]) ?ans? = (:,:,1) ?? 0.3616361?? 0.4826472?? 0.5015342?? 0.6325745 ?? 0.2922267?? 0.3321719?? 0.4368588?? 0.4051954 ?? 0.5664249?? 0.5935095?? 0.2693125?? 0.9184708 ?? 0.????????? 0.????????? 0.????????? 0. ?? 0.????????? 0.????????? 0.????????? 0. (:,:,2) ?? 0.0437334?? 0.4148104?? 0.7783129?? 0.6856896 ?? 0.4818509?? 0.2806498?? 0.211903??? 0.1531217 ?? 0.2639556?? 0.1280058?? 0.1121355?? 0.6970851 ?? 0.????????? 0.????????? 0.????????? 0. ?? 0.????????? 0.????????? 0.????????? 0. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Wed Jan 15 02:36:06 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 14 Jan 2020 22:36:06 -0300 Subject: [Scilab-users] range of colon In-Reply-To: References: <97d5ab0a-65ed-132a-4a47-294ceba3274f@fceia.unr.edu.ar> Message-ID: Samuel, > Really?: > > --> x = rand(3,4,2); > --> N= 5; > --> siz = size(x); > --> a = repmat(0,[N, siz(2:$)]);???? // Create array of 0's whose > columns have length N > --> a(1:siz(1), :) = x > > Submatrix incorrectly defined. > It worked for size (8,1,3). It shouldn't work either, but somehow it does... > Why not using resize_matrix()? > Thanks!!!!! It is exactjy what I needed, only I was not aware of its existence! Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Wed Jan 15 10:05:03 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Wed, 15 Jan 2020 10:05:03 +0100 Subject: [Scilab-users] BUG legends_mc with xsave and xload In-Reply-To: <5ec21f21-a83f-7433-613e-03aab959bb19@free.fr> References: <5ec21f21-a83f-7433-613e-03aab959bb19@free.fr> Message-ID: Hello Samuel, You are rigth, it runs with scilab .0.2 But my project is written ith scilab 5.5.2, and I can?t actually go to 6.0.2. May be in the second part of 2020 Is there a way to write a workaround with 5.5.2 ? I?ve done a copy of xload from 6.02 and try to adapt 1 no recursive for gcf().uid~=uid ==> replace by hh=gcf() then hh.uid~=uid 2 && not an operator in 5.5.2 (C langage) replace by & But the problem seems with load(fil) in function xloadFigure(fil) This is urgent for me to find a solution Any advices ? Best regards Pierre P. De : users De la part de Samuel Gougeon Envoy? : mardi 14 janvier 2020 21:08 ? : users at lists.scilab.org Objet : Re: [Scilab-users] BUG legends_mc with xsave and xload Hello Pierre, Le 14/01/2020 ? 18:33, Perrichon a ?crit : Hello, Hello Samuel, It seems that it is not possible to correctly record or to restaure a graph using ? legends_scm ? with ? xsave ? and ? xload ? Structures of the graph are not respected and illegible. If the bug is not corrected, I?ll will be obliged to go back with the ? legend ? instruction Sincerely How to reproduce the bugg : scf(1) clf, plot2d(), legends_mc('line #'+string(1:3), Lpc=-1, pos="ul" ) // classic xsave("foo.scg", gcf()) scf(2) xload("foo.scg") I am not able to reproduce any issue when running this code with Scilab 6.0.2 on Windows 7. The initial legend is recovered with the whole figure. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Wed Jan 15 10:08:49 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Wed, 15 Jan 2020 10:08:49 +0100 Subject: [Scilab-users] BUG legends_mc with xsave and xload References: <5ec21f21-a83f-7433-613e-03aab959bb19@free.fr> Message-ID: PS : xsave and xload correctly work with ? legend ? instruction under 5.5.2, but ? legends_mc ? is the ideal presentation. De : Perrichon Envoy? : mercredi 15 janvier 2020 10:05 ? : 'Users mailing list for Scilab' Objet : RE: [Scilab-users] BUG legends_mc with xsave and xload Hello Samuel, You are rigth, it runs with scilab .0.2 But my project is written ith scilab 5.5.2, and I can?t actually go to 6.0.2. May be in the second part of 2020 Is there a way to write a workaround with 5.5.2 ? I?ve done a copy of xload from 6.02 and try to adapt 1 no recursive for gcf().uid~=uid ==> replace by hh=gcf() then hh.uid~=uid 2 && not an operator in 5.5.2 (C langage) replace by & But the problem seems with load(fil) in function xloadFigure(fil) This is urgent for me to find a solution Any advices ? Best regards Pierre P. De : users > De la part de Samuel Gougeon Envoy? : mardi 14 janvier 2020 21:08 ? : users at lists.scilab.org Objet : Re: [Scilab-users] BUG legends_mc with xsave and xload Hello Pierre, Le 14/01/2020 ? 18:33, Perrichon a ?crit : Hello, Hello Samuel, It seems that it is not possible to correctly record or to restaure a graph using ? legends_scm ? with ? xsave ? and ? xload ? Structures of the graph are not respected and illegible. If the bug is not corrected, I?ll will be obliged to go back with the ? legend ? instruction Sincerely How to reproduce the bugg : scf(1) clf, plot2d(), legends_mc('line #'+string(1:3), Lpc=-1, pos="ul" ) // classic xsave("foo.scg", gcf()) scf(2) xload("foo.scg") I am not able to reproduce any issue when running this code with Scilab 6.0.2 on Windows 7. The initial legend is recovered with the whole figure. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Fri Jan 17 06:28:55 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Fri, 17 Jan 2020 02:28:55 -0300 Subject: [Scilab-users] Slight inconsistency and suggested mprovement in max / min / mean etc. Message-ID: Dear all, I've seen that functions like max, min, sum, prod, cumsum, cumprod, mean, median, stdev are similar in that they act on several data returning a scalar result. If "r" or "c" are includedas an additional argument, they operate along rows or columns. Except for max and min, they all accept 1 and 2 instead of "r" and "c". By the way, in several help pages this possibility is presented as a side note. I understand this slight difference is to allow the comparison of a whole array with a scalar, so that max(x,1), for instance, is an array whose components are the maximum between the original components and 1. This prevents using the general syntax max(x,1) which would be more consistent, allowing its genaralization as max(x,n) where n is the dimension along which the requested operation would be performed. Currently n may be only 1 and 2, but there is no reason why it couldn't be any other dimension. For instance, calling the third dimension"layer", max(x,3) would mean getting the maximum of a row and column along different layers. This could be used, for instance, to get the most brilliant version of a pixel along successive frames in a movie. To keep the comparison-with-a-scalar feature, it would be enough to place the scalar first: max(1,x). The only caution needed in this kind of comparisons is that if there is at least one non-scalar array in the comparison list, the last item should be non-scalar. Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Fri Jan 17 09:30:12 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 17 Jan 2020 08:30:12 +0000 Subject: [Scilab-users] {EXT} Slight inconsistency and suggested mprovement in max / min / mean etc. In-Reply-To: References: Message-ID: Hello Frederico, > De : Federico Miyara > Envoy? : vendredi 17 janvier 2020 06:29 > > so that max(x,1), for instance, is an array whose components are the > maximum between the original components and 1. > > This prevents using the general syntax max(x,1) which would be more > consistent, allowing its genaralization as max(x,n) where n is the > dimension along which the requested operation would be performed. This is an interesting point. One way to allow this would be to allow only one argument for max(). You can do : A = 0.2*[1 2 ; 3 4] max(list(A, 1)) (which already work at the present time) and thus we could keep the second argument for the dimension of the hypermatrix. Except that this may have a drastic impact on some existing customer code ;-) Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From hibr-list at gmx.de Fri Jan 17 14:34:25 2020 From: hibr-list at gmx.de (Hani Andreas Ibrahim) Date: Fri, 17 Jan 2020 14:34:25 +0100 Subject: [Scilab-users] Add files problems at fileexchange.scilab.org Message-ID: An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 14928 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 26161 bytes Desc: not available URL: From fmiyara at fceia.unr.edu.ar Sun Jan 19 20:44:37 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Sun, 19 Jan 2020 16:44:37 -0300 Subject: [Scilab-users] invoking components directly from aplication of function Message-ID: <95c9da05-4743-b81f-207b-c0945d792e42@fceia.unr.edu.ar> Dear All, I wonder if this way to invoke one or mor components from the result of applying a function size(xx)(3:$) is a stable and consolidated feature, or it might change in the future revering to previous versions, in which case? this syntax would be preferable: siz = size(xx) siz(3:$) Thanks, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Sun Jan 19 21:10:06 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Sun, 19 Jan 2020 21:10:06 +0100 Subject: [Scilab-users] invoking components directly from aplication of function In-Reply-To: <95c9da05-4743-b81f-207b-c0945d792e42@fceia.unr.edu.ar> References: <95c9da05-4743-b81f-207b-c0945d792e42@fceia.unr.edu.ar> Message-ID: <31e65670-8058-69ae-72e3-0297d8f50aaa@utc.fr> Hello, The so-called "recursive extraction" is a stable feature, don't worry. Best, S. Le 19/01/2020 ? 20:44, Federico Miyara a ?crit?: > > Dear All, > > I wonder if this way to invoke one or mor components from the result > of applying a function > > size(xx)(3:$) > > is a stable and consolidated feature, or it might change in the future > revering to previous versions, in which case? this syntax would be > preferable: > > siz = size(xx) > siz(3:$) > > Thanks, > > Federico Miyara > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Mon Jan 20 09:18:24 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Mon, 20 Jan 2020 05:18:24 -0300 Subject: [Scilab-users] Accessing elements sharing an index from a diimension en N-D arrays Message-ID: Dear All, I have an N-D array A (sometimes called hyperarray) with n dimensions, where n is a parameter a priori unknown since it is, for instance, an input argument of a function. So in conceptual form each element is A(k1, k2, k3, ..., kn) I'm looking for an elegant way to extract all elements with a given index over a given dimension, for instance A(:, k2, :, ..., :) This would mean to get an hyperarray made up of the k2-th column of all remaining dimensions. If extraction could be performed replacing the indexes by a list, for instance L = list(), for i=1:n ?? L($+1) = 1:size(A)(i); end L(2) = 1 Then A(L) would work, but the result is an error message "Invalid index". The only way a list is accepted as multidimensional index is that all except the first member are 1. Thanks, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Jan 20 09:29:42 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 20 Jan 2020 09:29:42 +0100 Subject: [Scilab-users] Accessing elements sharing an index from a diimension en N-D arrays In-Reply-To: References: Message-ID: <6415a21f-eafa-52a1-d5ea-73707299df33@free.fr> Le 20/01/2020 ? 09:18, Federico Miyara a ?crit?: > > Dear All, > > I have an N-D array A (sometimes called hyperarray) with n dimensions, > where n is a parameter a priori unknown since it is, for instance, an > input argument of a function. So in conceptual form each element is > > A(k1, k2, k3, ..., kn) > > I'm looking for an elegant way to extract all elements with a given > index over a given dimension, for instance > > A(:, k2, :, ..., :) > > This would mean to get an hyperarray made up of the k2-th column of > all remaining dimensions. > > If extraction could be performed replacing the indexes by a list, for > instance > > L = list(), > for i=1:n > ?? L($+1) = 1:size(A)(i); > end > L(2) = 1 > > Then A(L) would work, but the result is an error message "Invalid index". A(L(:)) should do it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Tue Jan 21 00:54:13 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Mon, 20 Jan 2020 20:54:13 -0300 Subject: [Scilab-users] Accessing elements sharing an index from a diimension en N-D arrays In-Reply-To: <6415a21f-eafa-52a1-d5ea-73707299df33@free.fr> References: <6415a21f-eafa-52a1-d5ea-73707299df33@free.fr> Message-ID: Samuel, Thanks VERY much! It certainly does the job, but I don't quite understand how. For example, to retrieve the last columns of all dimensions: A = matrix(1:120, [5,4,2 3]); L = list(); for i=1:length(size(A)) ??? L($+1) = 1:size(A)(i); end L(2) = size(A)(2); B = A(L(:)); B is exactly the desiredresult. But when I try to see what is L(:) I get --> L(:) ?ans? = ?? 1.?? 2.?? 3.?? 4.?? 5. and --> A(ans) ?ans? = ?? 1. ?? 2. ?? 3. ?? 4. ?? 5. If I try to assign L(:) to a variable I get --> u=L(:) Can not assign multiple value in a single variable So I attempt --> [u1,u2,u3,u4] = L(:) and get ?u4? = ?? 1.?? 2.?? 3. ?u3? = ?? 1.?? 2. ?u2? = ?? 4. ?u1? = ?? 1.?? 2.?? 3.?? 4.?? 5. However disp(L(:)) yields ?? 1.?? 2.?? 3. ?? 1.?? 2. ?? 4. ?? 1.?? 2.?? 3.?? 4.?? 5. I would like to understand what's going on. Regards, Federico Miyara On 20/01/2020 05:29, Samuel Gougeon wrote: > Le 20/01/2020 ? 09:18, Federico Miyara a ?crit?: >> >> Dear All, >> >> I have an N-D array A (sometimes called hyperarray) with n >> dimensions, where n is a parameter a priori unknown since it is, for >> instance, an input argument of a function. So in conceptual form each >> element is >> >> A(k1, k2, k3, ..., kn) >> >> I'm looking for an elegant way to extract all elements with a given >> index over a given dimension, for instance >> >> A(:, k2, :, ..., :) >> >> This would mean to get an hyperarray made up of the k2-th column of >> all remaining dimensions. >> >> If extraction could be performed replacing the indexes by a list, for >> instance >> >> L = list(), >> for i=1:n >> ?? L($+1) = 1:size(A)(i); >> end >> L(2) = 1 >> >> Then A(L) would work, but the result is an error message "Invalid index". > > > A(L(:)) should do it. > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Tue Jan 21 09:41:50 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 21 Jan 2020 05:41:50 -0300 Subject: [Scilab-users] log10 doesn't support hyperarrays Message-ID: Dear all, I've noticed that log10 doesn't support hyperarrays, while log (natural logrithm) does (even if the documantation in both cases says they are applicable to vectors and matrices: a = rand(3,2,2); b = log(a) c = log10(a) d = log(a)/log(10) --> b = log(a) ?b? = (:,:,1) ? -0.6847401? -0.0808957 ? -1.051648?? -0.0525378 ? -0.9483546? -1.06847 (:,:,2) ? -0.9781346? -0.6944493 ? -0.3091181? -1.3323448 ? -1.3410298? -0.6436786 --> c = log10(a) ?c? = ? -0.2973788? -0.0351326 ? -0.4567249? -0.0228169 ? -0.4118652? -0.4640306 --> d = log(a)/log(10) ?d? = (:,:,1) ? -0.2973788? -0.0351326 ? -0.4567249? -0.0228169 ? -0.4118652? -0.4640306 (:,:,2) ? -0.4247984? -0.3015955 ? -0.1342483? -0.57863 ? -0.5824019? -0.279546 As can be seen, log10 is yielding just the first page. It's strange, since log10 can be easily obtained from log, but both functions are primitives Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.mottelet at utc.fr Tue Jan 21 10:14:53 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 21 Jan 2020 10:14:53 +0100 Subject: [Scilab-users] log10 doesn't support hyperarrays In-Reply-To: References: Message-ID: Hi Frederico, You are right, we have to (and will) fix this before the release S. Le 21/01/2020 ? 09:41, Federico Miyara a ?crit?: > > Dear all, > > I've noticed that log10 doesn't support hyperarrays, while log > (natural logrithm) does (even if the documantation in both cases says > they are applicable to vectors and matrices: > > a = rand(3,2,2); > b = log(a) > c = log10(a) > d = log(a)/log(10) > > --> b = log(a) > ?b? = > > (:,:,1) > > ? -0.6847401? -0.0808957 > ? -1.051648?? -0.0525378 > ? -0.9483546? -1.06847 > (:,:,2) > > ? -0.9781346? -0.6944493 > ? -0.3091181? -1.3323448 > ? -1.3410298? -0.6436786 > > --> c = log10(a) > ?c? = > > ? -0.2973788? -0.0351326 > ? -0.4567249? -0.0228169 > ? -0.4118652? -0.4640306 > > --> d = log(a)/log(10) > ?d? = > > (:,:,1) > > ? -0.2973788? -0.0351326 > ? -0.4567249? -0.0228169 > ? -0.4118652? -0.4640306 > (:,:,2) > > ? -0.4247984? -0.3015955 > ? -0.1342483? -0.57863 > ? -0.5824019? -0.279546 > > As can be seen, log10 is yielding just the first page. > > It's strange, since log10 can be easily obtained from log, but both > functions are primitives > > Regards, > > Federico Miyara > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Tue Jan 21 18:59:05 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 21 Jan 2020 14:59:05 -0300 Subject: [Scilab-users] log10 doesn't support hyperarrays In-Reply-To: References: Message-ID: <3c84df22-f6d4-04ab-5993-3dc1901a4459@fceia.unr.edu.ar> St?phane, Thanks. Federico On 21/01/2020 06:14, St?phane Mottelet wrote: > > Hi Frederico, > > You are right, we have to (and will) fix this before the release > > S. > > Le 21/01/2020 ? 09:41, Federico Miyara a ?crit?: >> >> Dear all, >> >> I've noticed that log10 doesn't support hyperarrays, while log >> (natural logrithm) does (even if the documantation in both cases says >> they are applicable to vectors and matrices: >> >> a = rand(3,2,2); >> b = log(a) >> c = log10(a) >> d = log(a)/log(10) >> >> --> b = log(a) >> ?b? = >> >> (:,:,1) >> >> ? -0.6847401? -0.0808957 >> ? -1.051648?? -0.0525378 >> ? -0.9483546? -1.06847 >> (:,:,2) >> >> ? -0.9781346? -0.6944493 >> ? -0.3091181? -1.3323448 >> ? -1.3410298? -0.6436786 >> >> --> c = log10(a) >> ?c? = >> >> ? -0.2973788? -0.0351326 >> ? -0.4567249? -0.0228169 >> ? -0.4118652? -0.4640306 >> >> --> d = log(a)/log(10) >> ?d? = >> >> (:,:,1) >> >> ? -0.2973788? -0.0351326 >> ? -0.4567249? -0.0228169 >> ? -0.4118652? -0.4640306 >> (:,:,2) >> >> ? -0.4247984? -0.3015955 >> ? -0.1342483? -0.57863 >> ? -0.5824019? -0.279546 >> >> As can be seen, log10 is yielding just the first page. >> >> It's strange, since log10 can be easily obtained from log, but both >> functions are primitives >> >> Regards, >> >> Federico Miyara >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users > -- > St?phane Mottelet > Ing?nieur de recherche > EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable > D?partement G?nie des Proc?d?s Industriels > Sorbonne Universit?s - Universit? de Technologie de Compi?gne > CS 60319, 60203 Compi?gne cedex > Tel : +33(0)344234688 > http://www.utc.fr/~mottelet > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Wed Jan 22 17:45:16 2020 From: cfuttrup at gmail.com (Claus Futtrup) Date: Wed, 22 Jan 2020 17:45:16 +0100 Subject: [Scilab-users] Next Scilab releaes? Message-ID: Hi there Last Scilab release was 6.0.2, February last year. I wonder if there's another release coming soon? Will it be a minor patch release (6.0.3) or is there something bigger coming? Any roadmap? - What is the next big thing? (even if it's not coming soon) There was a conference in October, but is there anywhere I can read a summary? (https://www.esi-group.com/company/events/2019/scilab-conference-2019) Actually I wonder if there is anywhere I could read about recent activities in Scilab and future plans? Best regards, Claus From jean-philippe.grivet at wanadoo.fr Thu Jan 23 16:35:38 2020 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Thu, 23 Jan 2020 16:35:38 +0100 Subject: [Scilab-users] density in a graph In-Reply-To: References: Message-ID: <6302913e-e6f7-87f8-96b8-8db7df2f890f@wanadoo.fr> Dear all, I am drawing a graph in a gray scale (say from 1 to 32), using lines of different density. I would like that, in the region of intersection of two lines, the shade of gray be the sum of the densities of each line. How can I manage that ? Thanks in advance for any hint JP Grivet From Christophe.Dang at sidel.com Thu Jan 23 17:24:04 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 23 Jan 2020 16:24:04 +0000 Subject: [Scilab-users] {EXT} density in a graph In-Reply-To: <6302913e-e6f7-87f8-96b8-8db7df2f890f@wanadoo.fr> References: <6302913e-e6f7-87f8-96b8-8db7df2f890f@wanadoo.fr> Message-ID: Hello, > De : Jean-Philippe Grivet > Envoy? : jeudi 23 janvier 2020 16:36 > > I am drawing a graph in a gray scale (say from 1 to 32), using lines of different > density. I would like that, in the region of intersection of two lines, the shade > of gray be the sum of the densities of each line. > How can I manage that ? I'm affraid I can't figure out what you're trying to do. Maybe a small drawing or a small sample of data? Do you have lines with a linear density and try to draw a surface density or? -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From jean-philippe.grivet at wanadoo.fr Thu Jan 23 17:50:23 2020 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Thu, 23 Jan 2020 17:50:23 +0100 Subject: [Scilab-users] {EXT} density in a graph In-Reply-To: References: <6302913e-e6f7-87f8-96b8-8db7df2f890f@wanadoo.fr> Message-ID: Le 23/01/2020 ? 17:24, Dang Ngoc Chan, Christophe a ?crit?: > Hello, > >> De : Jean-Philippe Grivet >> Envoy? : jeudi 23 janvier 2020 16:36 >> >> I am drawing a graph in a gray scale (say from 1 to 32), using lines of different >> density. I would like that, in the region of intersection of two lines, the shade >> of gray be the sum of the densities of each line. >> How can I manage that ? > I'm affraid I can't figure out what you're trying to do. > > Maybe a small drawing or a small sample of data? > > Do you have lines with a linear density and try to draw a surface density or? > > -- > Christophe Dang Ngoc Chan > Mechanical calculation engineer > > General > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users Sorry that I haven't been clear enough. Suppose that I want to draw a figure X made up of two strips. Strip 1 (SW_NE) has gray level 3; strip 2 (NW-SE) is drawn at gray level 7. The region of overlap of these strips (roughly a parallelogram) should display a density of 7 (darker than either strip). Is that possible within Scilab ? From amonmayr at laas.fr Thu Jan 23 19:07:59 2020 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Thu, 23 Jan 2020 19:07:59 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBkZW5zaXR5IGluIGEgZ3Jh?= =?utf-8?q?ph?= In-Reply-To: <6302913e-e6f7-87f8-96b8-8db7df2f890f@wanadoo.fr> Message-ID: <6adf-5e29e100-11-59e29780@197223297> Hello Jean-Philippe, I think I understand what you want to do, but there is no easy way to get this in scilab. The main issue is that scilab does not support transparency. Otherwise, you could just plot your lines in black with 1/32 alpha (or 255/32 alpha if 0 means transparent and 255 solid color). For this kind of plot, I usually plot everything in scilab with a dummy color (let's say blue), export in svg, edit the svg to replace the dummy color by the transparent one. Antoine Le Jeudi, Janvier 23, 2020 16:35 CET, Jean-Philippe Grivet a ?crit: > Dear all, > > I am drawing a graph in a gray scale (say from 1 to 32), using lines of > different density. I would like that, in the region of intersection of > two lines, the shade of gray be the sum of the densities of each line. > How can I manage that ? > > Thanks in advance for any hint > > JP Grivet > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From cfuttrup at gmail.com Thu Jan 23 20:12:44 2020 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 23 Jan 2020 20:12:44 +0100 Subject: [Scilab-users] {EXT} density in a graph In-Reply-To: References: <6302913e-e6f7-87f8-96b8-8db7df2f890f@wanadoo.fr> Message-ID: Hi Jean-Philippe To me it sounds like you are trying to fill a set of polygons in Scilab, i.e. that what you wish to do can be done with xfpolys ... https://help.scilab.org/docs/6.0.2/en_US/xfpolys.html I doubt there is an automagic way to do it in Scilab. Probably it will require some manual labor and or thinking up some function on your own. (?) Best regards, Claus On 23.01.2020 17:50, Jean-Philippe Grivet wrote: > Le 23/01/2020 ? 17:24, Dang Ngoc Chan, Christophe a ?crit?: >> Hello, >> >>> De : Jean-Philippe Grivet >>> Envoy? : jeudi 23 janvier 2020 16:36 >>> >>> I am drawing a graph in a gray scale (say from 1 to 32), using lines >>> of different >>> density. I would like that, in the region of intersection of two >>> lines, the shade >>> of gray be the sum of the densities of each line. >>> How can I manage that ? >> I'm affraid I can't figure out what you're trying to do. >> >> Maybe a small drawing or a small sample of data? >> >> Do you have lines with a linear density and try to draw a surface >> density or? >> >> -- >> Christophe Dang Ngoc Chan >> Mechanical calculation engineer >> >> General >> This e-mail may contain confidential and/or privileged information. >> If you are not the intended recipient (or have received this e-mail >> in error), please notify the sender immediately and destroy this >> e-mail. Any unauthorized copying, disclosure or distribution of the >> material in this e-mail is strictly forbidden. >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > Sorry that I haven't been clear enough. Suppose that I want to draw a > figure X made up of two strips. Strip 1 (SW_NE) has gray level 3; > strip 2 (NW-SE) is drawn at gray level 7. The region of overlap of > these strips (roughly a parallelogram) should display a density of 7 > (darker than either strip). Is that possible within Scilab ? > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From p.muehlmann at gmail.com Thu Jan 23 21:27:54 2020 From: p.muehlmann at gmail.com (P M) Date: Thu, 23 Jan 2020 21:27:54 +0100 Subject: [Scilab-users] ?==?utf-8?q? density in a graph In-Reply-To: <6adf-5e29e100-11-59e29780@197223297> References: <6302913e-e6f7-87f8-96b8-8db7df2f890f@wanadoo.fr> <6adf-5e29e100-11-59e29780@197223297> Message-ID: something like this...only in gray? [image: test.png] Am Do., 23. Jan. 2020 um 19:08 Uhr schrieb Antoine Monmayrant < amonmayr at laas.fr>: > Hello Jean-Philippe, > > I think I understand what you want to do, but there is no easy way to get > this in scilab. > The main issue is that scilab does not support transparency. > Otherwise, you could just plot your lines in black with 1/32 alpha (or > 255/32 alpha if 0 means transparent and 255 solid color). > For this kind of plot, I usually plot everything in scilab with a dummy > color (let's say blue), export in svg, edit the svg to replace the dummy > color by the transparent one. > > Antoine > > > Le Jeudi, Janvier 23, 2020 16:35 CET, Jean-Philippe Grivet < > jean-philippe.grivet at wanadoo.fr> a ?crit: > > > Dear all, > > > > I am drawing a graph in a gray scale (say from 1 to 32), using lines of > > different density. I would like that, in the region of intersection of > > two lines, the shade of gray be the sum of the densities of each line. > > How can I manage that ? > > > > Thanks in advance for any hint > > > > JP Grivet > > > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.png Type: image/png Size: 6645 bytes Desc: not available URL: From sgougeon at free.fr Fri Jan 24 01:31:28 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 24 Jan 2020 01:31:28 +0100 Subject: [Scilab-users] Accessing elements sharing an index from a diimension en N-D arrays In-Reply-To: References: <6415a21f-eafa-52a1-d5ea-73707299df33@free.fr> Message-ID: <7474e097-1d63-318a-d2c1-0b7b6f7a7e51@free.fr> Le 21/01/2020 ? 00:54, Federico Miyara a ?crit?: > > Samuel, > > Thanks VERY much! > > It certainly does the job, but I don't quite understand how. For > example, to retrieve the last columns of all dimensions: > > > A = matrix(1:120, [5,4,2 3]); > > L = list(); > for i=1:length(size(A)) > ??? L($+1) = 1:size(A)(i); > end > > L(2) = size(A)(2); // or L = list(); for i = 1:ndims(A) ??? L($+1) = :; end L(2) = $; > > B = A(L(:)); > > B is exactly the desiredresult. But when I try to see what is L(:) I get > > --> L(:) > ?ans? = > > ?? 1.?? 2.?? 3.?? 4.?? 5. Yes, it's a bit tricky: L(:) extracts all L components, but there is no LHS recipient except the invisible ans. Then, only ans is assigned, to L(1). Other L(2:$) are ignored. > .../... > > If I try to assign L(:) to a variable I get > > --> u=L(:) > > Can not assign multiple value in a single variable This is somewhat reported here: http://bugzilla.scilab.org/14372 > > So I attempt > > --> [u1,u2,u3,u4] = L(:) > > and get > > > ?u4? = > > ?? 1.?? 2.?? 3. > ?u3? = > > ?? 1.?? 2. > ?u2? = > > ?? 4. > ?u1? = > > ?? 1.?? 2.?? 3.?? 4.?? 5. This is described on https://help.scilab.org/docs/6.0.2/en_US/brackets.html > > ../.. > > I would like to understand what's going on. (a,b,c) is the smart Scilab "deal()" operator: [a, b, c] = (3, 1, -2) --> [a, b, c] = (3, "Hi", -2) ?a? = ? 3. ?b? = ? Hi ?c? = ?? -2 Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Fri Jan 24 02:47:08 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Thu, 23 Jan 2020 22:47:08 -0300 Subject: [Scilab-users] Accessing elements sharing an index from a diimension en N-D arrays In-Reply-To: <7474e097-1d63-318a-d2c1-0b7b6f7a7e51@free.fr> References: <6415a21f-eafa-52a1-d5ea-73707299df33@free.fr> <7474e097-1d63-318a-d2c1-0b7b6f7a7e51@free.fr> Message-ID: Samuel, Thank you for your very informative answer. Regards, Federico Miyara On 23/01/2020 21:31, Samuel Gougeon wrote: > Le 21/01/2020 ? 00:54, Federico Miyara a ?crit?: >> >> Samuel, >> >> Thanks VERY much! >> >> It certainly does the job, but I don't quite understand how. For >> example, to retrieve the last columns of all dimensions: >> >> >> A = matrix(1:120, [5,4,2 3]); >> >> L = list(); >> for i=1:length(size(A)) >> ??? L($+1) = 1:size(A)(i); >> end >> >> L(2) = size(A)(2); > > > // or > L = list(); > for i = 1:ndims(A) > ??? L($+1) = :; > end > L(2) = $; > > >> >> B = A(L(:)); >> >> B is exactly the desiredresult. But when I try to see what is L(:) I get >> >> --> L(:) >> ?ans? = >> >> ?? 1.?? 2.?? 3.?? 4.?? 5. > > > Yes, it's a bit tricky: L(:) extracts all L components, but there is > no LHS recipient except the invisible ans. Then, only ans is assigned, > to L(1). Other L(2:$) are ignored. > > >> .../... >> >> If I try to assign L(:) to a variable I get >> >> --> u=L(:) >> >> Can not assign multiple value in a single variable > > > This is somewhat reported here: http://bugzilla.scilab.org/14372 > > >> >> So I attempt >> >> --> [u1,u2,u3,u4] = L(:) >> >> and get >> >> >> ?u4? = >> >> ?? 1.?? 2.?? 3. >> ?u3? = >> >> ?? 1.?? 2. >> ?u2? = >> >> ?? 4. >> ?u1? = >> >> ?? 1.?? 2.?? 3.?? 4.?? 5. > > > This is described on > https://help.scilab.org/docs/6.0.2/en_US/brackets.html > > >> >> ../.. >> >> I would like to understand what's going on. > > > (a,b,c) is the smart Scilab "deal()" operator: > > [a, b, c] = (3, 1, -2) > > --> [a, b, c] = (3, "Hi", -2) > ?a? = > ? 3. > > ?b? = > ? Hi > > ?c? = > ?? -2 > > Regards > Samuel > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Jan 24 03:03:47 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 24 Jan 2020 03:03:47 +0100 Subject: [Scilab-users] Slight inconsistency and suggested mprovement in max / min / mean etc. In-Reply-To: References: Message-ID: <1392c348-81f1-432d-9cb9-47fa5d54dfe0@free.fr> Le 17/01/2020 ? 06:28, Federico Miyara a ?crit?: > > Dear all, > > I've seen that functions like max, min, sum, prod, cumsum, cumprod, > mean, median, stdev are similar in that they act on several data > returning a scalar result. If "r" or "c" are includedas an additional > argument, they operate along rows or columns. > > Except for max and min, they all accept 1 and 2 instead of "r" and > "c". By the way, in several help pages this possibility is presented > as a side note. > > I understand this slight difference is to allow the comparison of a > whole array with a scalar, so that max(x,1), for instance, is an array > whose components are the maximum between the original components and 1. > > This prevents using the general syntax max(x,1) which would be more > consistent, allowing its genaralization as max(x,n) where n is the > dimension along which the requested operation would be performed. > > Currently n may be only 1 and 2, but there is no reason why it > couldn't be any other dimension. For instance, calling the third > dimension"layer", max(x,3) would mean getting the maximum of a row and > column along different layers. This could be used, for instance, to > get the most brilliant version of a pixel along successive frames in a > movie. > > To keep the comparison-with-a-scalar feature, it would be enough to > place the scalar first: max(1,x). The only caution needed in this kind > of comparisons is that if there is at least one non-scalar array in > the comparison list, the last item should be non-scalar. This issue is reported at http://bugzilla.scilab.org/14639. It is proposed to exceptionnaly specify the dim as a literal number, as in max(A,"3") Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Fri Jan 24 08:45:40 2020 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Fri, 24 Jan 2020 08:45:40 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBk?= =?utf-8?q?ensity_in_a_grap?= In-Reply-To: Message-ID: <2418-5e2aa080-27-6734c400@262092734> That's what I understood, but using lines, not polygons. Another approach than what I suggested previously would be to pixelate everything: ie make a big matrix for the whole graph and increment the value stored at a certain coordinate whenever it falls under one of the lines. You could then plot this matrix using matplot of sgrayplot... with a graycolormap (maybe reversed graycolormap). Far from ideal, but it would work. Antoine Le Jeudi, Janvier 23, 2020 21:27 CET, P M a ?crit: > something like this...only in gray? > [image: test.png] > > Am Do., 23. Jan. 2020 um 19:08 Uhr schrieb Antoine Monmayrant < > amonmayr at laas.fr>: > > > Hello Jean-Philippe, > > > > I think I understand what you want to do, but there is no easy way to get > > this in scilab. > > The main issue is that scilab does not support transparency. > > Otherwise, you could just plot your lines in black with 1/32 alpha (or > > 255/32 alpha if 0 means transparent and 255 solid color). > > For this kind of plot, I usually plot everything in scilab with a dummy > > color (let's say blue), export in svg, edit the svg to replace the dummy > > color by the transparent one. > > > > Antoine > > > > > > Le Jeudi, Janvier 23, 2020 16:35 CET, Jean-Philippe Grivet < > > jean-philippe.grivet at wanadoo.fr> a ?crit: > > > > > Dear all, > > > > > > I am drawing a graph in a gray scale (say from 1 to 32), using lines of > > > different density. I would like that, in the region of intersection of > > > two lines, the shade of gray be the sum of the densities of each line. > > > How can I manage that ? > > > > > > Thanks in advance for any hint > > > > > > JP Grivet > > > > > > > > > _______________________________________________ > > > users mailing list > > > users at lists.scilab.org > > > http://lists.scilab.org/mailman/listinfo/users > > > > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > From jean-philippe.grivet at wanadoo.fr Fri Jan 24 10:24:20 2020 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Fri, 24 Jan 2020 10:24:20 +0100 Subject: [Scilab-users] ?==?utf-8?q? density in a graph In-Reply-To: <6adf-5e29e100-11-59e29780@197223297> References: <6adf-5e29e100-11-59e29780@197223297> Message-ID: <24ff10e0-12e2-1693-39ca-0eb4c84cabdd@wanadoo.fr> Le 23/01/2020 ? 19:07, Antoine Monmayrant a ?crit?: > Hello Jean-Philippe, > > I think I understand what you want to do, but there is no easy way to get this in scilab. > The main issue is that scilab does not support transparency. > Otherwise, you could just plot your lines in black with 1/32 alpha (or 255/32 alpha if 0 means transparent and 255 solid color). > For this kind of plot, I usually plot everything in scilab with a dummy color (let's say blue), export in svg, edit the svg to replace the dummy color by the transparent one. > > Antoine > > > Le Jeudi, Janvier 23, 2020 16:35 CET, Jean-Philippe Grivet a ?crit: > >> Dear all, >> >> I am drawing a graph in a gray scale (say from 1 to 32), using lines of >> different density. I would like that, in the region of intersection of >> two lines, the shade of gray be the sum of the densities of each line. >> How can I manage that ? >> >> Thanks in advance for any hint >> >> JP Grivet >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > users at lists.scilab.org Thank you Antoine; I am not famo=iliar with the SVG format, but I will investigate. JP Grivet From jean-philippe.grivet at wanadoo.fr Fri Jan 24 10:28:08 2020 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Fri, 24 Jan 2020 10:28:08 +0100 Subject: [Scilab-users] ?==?utf-8?q? density in a graph In-Reply-To: References: <6302913e-e6f7-87f8-96b8-8db7df2f890f@wanadoo.fr> <6adf-5e29e100-11-59e29780@197223297> Message-ID: Le 23/01/2020 ? 21:27, P M a ?crit?: > something like this...only in gray? > test.png > > Am Do., 23. Jan. 2020 um 19:08?Uhr schrieb Antoine Monmayrant > >: > > Hello Jean-Philippe, > > I think I understand what you want to do, but there is no easy way > to get this in scilab. > The main issue is that scilab does not support transparency. > Otherwise, you could just plot your lines in black with 1/32 alpha > (or 255/32 alpha if 0 means transparent and 255 solid color). > For this kind of plot, I usually plot everything in scilab with a > dummy color (let's say blue), export in svg, edit the svg to > replace the dummy color by the transparent one. > > Antoine > > > Le Jeudi, Janvier 23, 2020 16:35 CET, Jean-Philippe Grivet > > a ?crit: > > > Dear all, > > > > I am drawing a graph in a gray scale (say from 1 to 32), using > lines of > > different density. I would like that, in the region of > intersection of > > two lines, the shade of gray be the sum of the densities of each > line. > > How can I manage that ? > > > > Thanks in advance for any hint > > > > JP Grivet > > > > > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users You understood perfectly, although my goal is simpler: instead of a blend of colors I look for a sum of densities. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: test.png Type: image/png Size: 6645 bytes Desc: not available URL: From Christophe.Dang at sidel.com Fri Jan 24 10:30:10 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 24 Jan 2020 09:30:10 +0000 Subject: [Scilab-users] {EXT} Re: ?==?utf-8?q? density in a graph In-Reply-To: <24ff10e0-12e2-1693-39ca-0eb4c84cabdd@wanadoo.fr> References: <6adf-5e29e100-11-59e29780@197223297> <24ff10e0-12e2-1693-39ca-0eb4c84cabdd@wanadoo.fr> Message-ID: Hello, > De : Jean-Philippe Grivet > Envoy? : vendredi 24 janvier 2020 10:24 > > Thank you Antoine; I am not famo=iliar with the SVG format, but I will > investigate. As you seem to understand French, may I recommend you a small page of mine? https://fr.wikibooks.org/wiki/D%C3%A9couvrir_le_SVG/Le_SVG_pour_l%27enseignement_des_math%C3%A9matiques_et_de_la_programmation Hope this helps, regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From jean-philippe.grivet at wanadoo.fr Fri Jan 24 10:34:50 2020 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Fri, 24 Jan 2020 10:34:50 +0100 Subject: [Scilab-users] ?= density in a grap In-Reply-To: <2418-5e2aa080-27-6734c400@262092734> References: <2418-5e2aa080-27-6734c400@262092734> Message-ID: Le 24/01/2020 ? 08:45, Antoine Monmayrant a ?crit?: > That's what I understood, but using lines, not polygons. > > Another approach than what I suggested previously would be to pixelate everything: ie make a big matrix for the whole graph and increment the value stored at a certain coordinate whenever it falls under one of the lines. > You could then plot this matrix using matplot of sgrayplot... with a graycolormap (maybe reversed graycolormap). > Far from ideal, but it would work. > > Antoine > > > Le Jeudi, Janvier 23, 2020 21:27 CET, P M a ?crit: > >> something like this...only in gray? >> [image: test.png] >> >> Am Do., 23. Jan. 2020 um 19:08 Uhr schrieb Antoine Monmayrant < >> amonmayr at laas.fr>: >> >>> Hello Jean-Philippe, >>> >>> I think I understand what you want to do, but there is no easy way to get >>> this in scilab. >>> The main issue is that scilab does not support transparency. >>> Otherwise, you could just plot your lines in black with 1/32 alpha (or >>> 255/32 alpha if 0 means transparent and 255 solid color). >>> For this kind of plot, I usually plot everything in scilab with a dummy >>> color (let's say blue), export in svg, edit the svg to replace the dummy >>> color by the transparent one. >>> >>> Antoine >>> >>> >>> Le Jeudi, Janvier 23, 2020 16:35 CET, Jean-Philippe Grivet < >>> jean-philippe.grivet at wanadoo.fr> a ?crit: >>> >>>> Dear all, >>>> >>>> I am drawing a graph in a gray scale (say from 1 to 32), using lines of >>>> different density. I would like that, in the region of intersection of >>>> two lines, the shade of gray be the sum of the densities of each line. >>>> How can I manage that ? >>>> >>>> Thanks in advance for any hint >>>> >>>> JP Grivet >>>> >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >>> > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users This approach looks rather easy to me. Have you a suggestion on how I can define the pixels to be modified ? Than you all for your suggestions JP Grivet From amonmayr at laas.fr Fri Jan 24 16:21:40 2020 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Fri, 24 Jan 2020 16:21:40 +0100 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyA/PSBk?= =?utf-8?q?ensity_in_a_grap?= In-Reply-To: Message-ID: Hello, Well for the pixelated version, it needs a bit of coding that depends on the details of your specific case. But here is a short example of the alternative method: generate an svg file and modify it afterwards to add opacity info. The key idea is to set the color of the lines we want to set 1/2 transparent to something unique in the graph (like not white or black or some other color that are usually present in the axis) and later search the svg file for this specific color and add opacity. Hope it helps, Antoine //////////////////////////////////////////////////////////////////////// cd('~'); // change here the color for any color that will be different from all other // colors in the graph colorStr="(10,10,10)" opacity=0.3;//final opacity in the svg [0,1], 0 means transparent, 1 opaque // the text that will appear in the generated svg and for each line searchStr="stroke:rgb"+colorStr+";"; // we need to add the opacity info replaceStr="stroke:"+colorStr+";stroke-opacity:"+string(opacity)+";"; // string to be executed after each plot of one of the line we want to be // 1/2transparent setLineStr="e=gce();e.children.thickness=10;e.children.foreground=color"+colorStr; //dummy data x=linspace(-1,1,10); // the graph with overlapping lines f=scf(); plot(x,x,'r') execstr(setLineStr) plot(x,-x,'b') execstr(setLineStr) plot(x,0.5*ones(x),'b') execstr(setLineStr) plot(x,-0.5*ones(x),'b') execstr(setLineStr) plot(0.5*ones(x),x,'b') execstr(setLineStr) plot(-0.5*ones(x),x,'b') execstr(setLineStr) xs2svg(f,"test.svg") //read the generated svg file fd = mopen('test.svg', 'rt') svgTxt=mgetl(fd) mclose(fd); // add the transparency info // can also alter all the line properties (color, width, ...) newSvgTxt = strsubst(svgTxt, searchStr, replaceStr) // write the new svg file with 1/2transparent lines fd = mopen('test_transparency.svg', 'wt') mputl(newSvgTxt,fd) mclose(fd); //////////////////////////////////////////////////////////////////////// Le Vendredi, Janvier 24, 2020 10:34 CET, Jean-Philippe Grivet a ?crit: > Le 24/01/2020 ? 08:45, Antoine Monmayrant a ?crit?: > > That's what I understood, but using lines, not polygons. > > > > Another approach than what I suggested previously would be to pixelate everything: ie make a big matrix for the whole graph and increment the value stored at a certain coordinate whenever it falls under one of the lines. > > You could then plot this matrix using matplot of sgrayplot... with a graycolormap (maybe reversed graycolormap). > > Far from ideal, but it would work. > > > > Antoine > > > > > > Le Jeudi, Janvier 23, 2020 21:27 CET, P M a ?crit: > > > >> something like this...only in gray? > >> [image: test.png] > >> > >> Am Do., 23. Jan. 2020 um 19:08 Uhr schrieb Antoine Monmayrant < > >> amonmayr at laas.fr>: > >> > >>> Hello Jean-Philippe, > >>> > >>> I think I understand what you want to do, but there is no easy way to get > >>> this in scilab. > >>> The main issue is that scilab does not support transparency. > >>> Otherwise, you could just plot your lines in black with 1/32 alpha (or > >>> 255/32 alpha if 0 means transparent and 255 solid color). > >>> For this kind of plot, I usually plot everything in scilab with a dummy > >>> color (let's say blue), export in svg, edit the svg to replace the dummy > >>> color by the transparent one. > >>> > >>> Antoine > >>> > >>> > >>> Le Jeudi, Janvier 23, 2020 16:35 CET, Jean-Philippe Grivet < > >>> jean-philippe.grivet at wanadoo.fr> a ?crit: > >>> > >>>> Dear all, > >>>> > >>>> I am drawing a graph in a gray scale (say from 1 to 32), using lines of > >>>> different density. I would like that, in the region of intersection of > >>>> two lines, the shade of gray be the sum of the densities of each line. > >>>> How can I manage that ? > >>>> > >>>> Thanks in advance for any hint > >>>> > >>>> JP Grivet > >>>> > >>>> > >>>> _______________________________________________ > >>>> users mailing list > >>>> users at lists.scilab.org > >>>> http://lists.scilab.org/mailman/listinfo/users > >>>> > >>> _______________________________________________ > >>> users mailing list > >>> users at lists.scilab.org > >>> http://lists.scilab.org/mailman/listinfo/users > >>> > > _______________________________________________ > > users mailing list > > users at lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > This approach looks rather easy to me. Have you a suggestion on how I > can define the pixels to be modified ? > > Than you all for your suggestions > > JP Grivet > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From fmiyara at fceia.unr.edu.ar Sat Jan 25 04:11:30 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Sat, 25 Jan 2020 00:11:30 -0300 Subject: [Scilab-users] real-time volume control Message-ID: Dear all, I wonder if it is possible, somehow, even commanding some external module, to control the volume of a sound being reproduced in real time from Scilab. The ideal solution would be to do it all within Scilab, I mean, that one could trigger the sound playback and then run some code capable of sending orders to the volume control of the audio driver. Regards, Federico Miyara -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Sun Jan 26 12:45:26 2020 From: arctica1963 at gmail.com (Lester Anderson) Date: Sun, 26 Jan 2020 11:45:26 +0000 Subject: [Scilab-users] Double and triple integral query Message-ID: 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 variable(s) e.g.: double_integral (f(x,y), var_x, lower_x, upper_x, Var_y, lower_y, upper_y) etc Thanks for any pointers Lester -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Sun Jan 26 19:06:43 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Sun, 26 Jan 2020 19:06:43 +0100 Subject: [Scilab-users] Refreshing the browser under Xcos Message-ID: Hello I save a set of figures in a sce file under Xcos, using xsave instruction But the browser is no refresh with the new files (I have to go to another directory and go back tu the current directory to finally see the new files. Is there a scilab instruction to resfreh the directory into the Xcos browser ? Best Regards Pierre P. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Mon Jan 27 09:46:20 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Mon, 27 Jan 2020 08:46:20 +0000 Subject: [Scilab-users] Double and triple integral query Message-ID: Hello, > De : Lester Anderson > Envoy? : dimanche 26 janvier 2020 12:45 > > 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)? Do you mean something like meshgrid() but that would generate triangles? https://help.scilab.org/docs/6.0.2/en_US/meshgrid.html -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From stephane.mottelet at utc.fr Mon Jan 27 09:54:23 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Mon, 27 Jan 2020 09:54:23 +0100 Subject: [Scilab-users] Double and triple integral query In-Reply-To: References: Message-ID: <673143ea-2035-003f-7403-54db2e2721f4@utc.fr> Hello, Generating a 2d triangular mesh will be possible in 6.1 version, see https://codereview.scilab.org/#/c/20681/ S. Le 27/01/2020 ? 09:46, Dang Ngoc Chan, Christophe a ?crit?: > Hello, > >> De : Lester Anderson >> Envoy? : dimanche 26 janvier 2020 12:45 >> >> 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)? > Do you mean something like meshgrid() but that would generate triangles? > > https://antispam.utc.fr/proxy/2/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/help.scilab.org/docs/6.0.2/en_US/meshgrid.html > > -- > Christophe Dang Ngoc Chan > Mechanical calculation engineer > > General > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users -- St?phane Mottelet Ing?nieur de recherche EA 4297 Transformations Int?gr?es de la Mati?re Renouvelable D?partement G?nie des Proc?d?s Industriels Sorbonne Universit?s - Universit? de Technologie de Compi?gne CS 60319, 60203 Compi?gne cedex Tel : +33(0)344234688 http://www.utc.fr/~mottelet From sgougeon at free.fr Mon Jan 27 09:59:10 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 27 Jan 2020 09:59:10 +0100 Subject: [Scilab-users] Double and triple integral query In-Reply-To: References: Message-ID: <91a1c1e0-c83b-d0bb-c602-480b6dbbe308@free.fr> Hello, Le 26/01/2020 ? 12:45, Lester Anderson a ?crit?: > 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)? > For int2d(): mesh2d() is restored as native Scilab function in Scilab 6.1.0: http://bugzilla.scilab.org/attachment.cgi?id=4975 https://build.scilab.org/view/Scilab%20binaries/? (master) For int3d(): the closest matching resources could be available in the CGLAB module: https://atoms.scilab.org/toolboxes/cglab > > It would be nice to just specify the function, limits and integration > variable(s) e.g.: > double_integral (f(x,y), var_x, lower_x, upper_x, Var_y, lower_y, > upper_y) etc Please feel free to post this wish on Bugzilla. Regards Samuel From cfuttrup at gmail.com Mon Jan 27 11:25:46 2020 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 27 Jan 2020 11:25:46 +0100 Subject: [Scilab-users] FEA in Scilab Message-ID: Dear fellow Scilabers There are various initiatives and possibly demonstration projects for implementing Finite Element algorithms and Analysis in Scilab. Please help me by providing pointers. What I'd like to simulate is the suspension of a loudspeaker (the cloth spider which essentially centers the voice coil in the air gap), in particular I wish to calculate a force-deflection curve. In my particular case, I'd like to describe the spider as a collection of line segments (straight lines as well as circular sections). This description represents a cross section view of the spider. For proper modeling, this is an axisymmetric model of the spider. I have a simple description of what I'd like to do in Scilab, but done in a software named Mecway. The PDF is 650 kb (4 pages). I am worried about attaching such a document to the User Group here in general, but I can of course send it on request. In Mecway the axisymmetric model is expanded into 3D with hex8 elements (it looks like a basic cubic element). The force-function is applied in 40 time steps. It looks like 40 x basic static analysis. Please let me know what you think would be suitable for solving this problem. Is there a suitable ATOMS library? Best regards, Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-philippe.grivet at wanadoo.fr Mon Jan 27 15:30:05 2020 From: jean-philippe.grivet at wanadoo.fr (Jean-Philippe Grivet) Date: Mon, 27 Jan 2020 15:30:05 +0100 Subject: [Scilab-users] density in a graph In-Reply-To: <6adf-5e29e100-11-59e29780@197223297> References: <6adf-5e29e100-11-59e29780@197223297> Message-ID: <56bf6ebf-ab7d-c4b9-0b11-37ab5a503758@wanadoo.fr> P M, Claus, Antoine, Christophe; Federico: Thank you? all fior your multifaceted and interesting suggestions. A special mention to Christophe: the pages on the SVG format are extremely clear; in my opinion, they deserve a wide audience and should be translated in English. I now understand that I should have described my ultimate goal, even though it is somewhat complicated.. My aim is to emulate image reconstruction in X-ray tomography. In the simplest reconstruction algorithm,? back projection, one must darken the image plane proportional to the value? of? a "projection" of the object, for each projection direction (at least 128 in all). These "darkenings"? must add everywhere in the image plane. A sketch of this process is shown in the attached figure. I have found two other possible approaches. In thee book by Michel Goossens et al (the Latex graphics companion) there appears (pp 257-258) a Latex program that emulates transparency. To use this , I would have to read into pstricks the coordinates of the various rectangles, which seems possible. Moreover, I have read that PDF supports transparency, though I have no idea how this fact could be exploited in Scilab. I have quie a lot of home work to do! Thank you again for your help. JP Grivet -------------- next part -------------- A non-text attachment was scrubbed... Name: scanner.pdf Type: application/pdf Size: 18934 bytes Desc: not available URL: From heinznabielek at me.com Mon Jan 27 16:01:44 2020 From: heinznabielek at me.com (Heinz Nabielek) Date: Mon, 27 Jan 2020 16:01:44 +0100 Subject: [Scilab-users] FEA in Scilab In-Reply-To: References: Message-ID: <0D29E4C3-61C2-405A-8218-25B02A5666C3@me.com> I would have no idea, if the report "Finite Elements in Scilab: Solution of partial differential equations supported by the FreeFEM toolbox" is any help. Dr van Seggern is long retired from the Forschungszentrum J?lich. Greetings Heinz FORSCHUNGSZENTRUM J?LICH GmbH Zentralinstitut f?r Angewandte Mathematik D-52425 J?lich, Tel. (02461) 61-6402 Interner Bericht Finite Elemente in Scilab:Das L?sen partieller Differentialgleichungen mit Hilfe der FreeFEM-Toolbox Rainer von Seggern FZJ-ZAM-IB-2001-03 April 2001 > On 27.01.2020, at 11:25, Claus Futtrup wrote: > > Dear fellow Scilabers > > There are various initiatives and possibly demonstration projects for implementing Finite Element algorithms and Analysis in Scilab. Please help me by providing pointers. > > What I'd like to simulate is the suspension of a loudspeaker (the cloth spider which essentially centers the voice coil in the air gap), in particular I wish to calculate a force-deflection curve. > > In my particular case, I'd like to describe the spider as a collection of line segments (straight lines as well as circular sections). This description represents a cross section view of the spider. For proper modeling, this is an axisymmetric model of the spider. > > I have a simple description of what I'd like to do in Scilab, but done in a software named Mecway. The PDF is 650 kb (4 pages). I am worried about attaching such a document to the User Group here in general, but I can of course send it on request. In Mecway the axisymmetric model is expanded into 3D with hex8 elements (it looks like a basic cubic element). The force-function is applied in 40 time steps. It looks like 40 x basic static analysis. > > Please let me know what you think would be suitable for solving this problem. Is there a suitable ATOMS library? > > Best regards, > Claus > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From cfuttrup at gmail.com Mon Jan 27 18:32:06 2020 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 27 Jan 2020 18:32:06 +0100 Subject: [Scilab-users] FEA in Scilab In-Reply-To: <0D29E4C3-61C2-405A-8218-25B02A5666C3@me.com> References: <0D29E4C3-61C2-405A-8218-25B02A5666C3@me.com> Message-ID: <1c11e43d-e68a-da35-274f-5cb9bfac93fe@gmail.com> Hi I've searched for FreeFEM and found https://wiki.scilab.org/FreeFem ... but the wiki returns that the page no longer exist. Do you know of another link? Best regards, Claus On 27.01.2020 16:01, Heinz Nabielek wrote: > I would have no idea, if the report > > "Finite Elements in Scilab: Solution of partial differential equations supported by the FreeFEM toolbox" > > is any help. Dr van Seggern is long retired from the Forschungszentrum J?lich. > Greetings > Heinz > > > > > FORSCHUNGSZENTRUM J?LICH GmbH > Zentralinstitut f?r Angewandte Mathematik > D-52425 J?lich, Tel. (02461) 61-6402 > Interner Bericht > Finite Elemente in Scilab:Das L?sen partieller Differentialgleichungen mit Hilfe der FreeFEM-Toolbox > > Rainer von Seggern > FZJ-ZAM-IB-2001-03 > April 2001 > >> On 27.01.2020, at 11:25, Claus Futtrup wrote: >> >> Dear fellow Scilabers >> >> There are various initiatives and possibly demonstration projects for implementing Finite Element algorithms and Analysis in Scilab. Please help me by providing pointers. >> >> What I'd like to simulate is the suspension of a loudspeaker (the cloth spider which essentially centers the voice coil in the air gap), in particular I wish to calculate a force-deflection curve. >> >> In my particular case, I'd like to describe the spider as a collection of line segments (straight lines as well as circular sections). This description represents a cross section view of the spider. For proper modeling, this is an axisymmetric model of the spider. >> >> I have a simple description of what I'd like to do in Scilab, but done in a software named Mecway. The PDF is 650 kb (4 pages). I am worried about attaching such a document to the User Group here in general, but I can of course send it on request. In Mecway the axisymmetric model is expanded into 3D with hex8 elements (it looks like a basic cubic element). The force-function is applied in 40 time steps. It looks like 40 x basic static analysis. >> >> Please let me know what you think would be suitable for solving this problem. Is there a suitable ATOMS library? >> >> Best regards, >> Claus >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From denis.crete at thalesgroup.com Mon Jan 27 18:35:27 2020 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Mon, 27 Jan 2020 17:35:27 +0000 Subject: [Scilab-users] FEA in Scilab In-Reply-To: <1c11e43d-e68a-da35-274f-5cb9bfac93fe@gmail.com> References: <0D29E4C3-61C2-405A-8218-25B02A5666C3@me.com> <1c11e43d-e68a-da35-274f-5cb9bfac93fe@gmail.com> Message-ID: <6a16b32d1e0543349415c64478f4dabf@thalesgroup.com> Hello, You can try freefem.org HTH Denis -----Message d'origine----- De?: users [mailto:users-bounces at lists.scilab.org] De la part de Claus Futtrup Envoy??: lundi 27 janvier 2020 18:32 ??: users at lists.scilab.org Objet?: Re: [Scilab-users] FEA in Scilab Hi I've searched for FreeFEM and found https://wiki.scilab.org/FreeFem ... but the wiki returns that the page no longer exist. Do you know of another link? Best regards, Claus On 27.01.2020 16:01, Heinz Nabielek wrote: > I would have no idea, if the report > > "Finite Elements in Scilab: Solution of partial differential equations supported by the FreeFEM toolbox" > > is any help. Dr van Seggern is long retired from the Forschungszentrum J?lich. > Greetings > Heinz > > > > > FORSCHUNGSZENTRUM J?LICH GmbH > Zentralinstitut f?r Angewandte Mathematik > D-52425 J?lich, Tel. (02461) 61-6402 > Interner Bericht > Finite Elemente in Scilab:Das L?sen partieller Differentialgleichungen mit Hilfe der FreeFEM-Toolbox > > Rainer von Seggern > FZJ-ZAM-IB-2001-03 > April 2001 > >> On 27.01.2020, at 11:25, Claus Futtrup wrote: >> >> Dear fellow Scilabers >> >> There are various initiatives and possibly demonstration projects for implementing Finite Element algorithms and Analysis in Scilab. Please help me by providing pointers. >> >> What I'd like to simulate is the suspension of a loudspeaker (the cloth spider which essentially centers the voice coil in the air gap), in particular I wish to calculate a force-deflection curve. >> >> In my particular case, I'd like to describe the spider as a collection of line segments (straight lines as well as circular sections). This description represents a cross section view of the spider. For proper modeling, this is an axisymmetric model of the spider. >> >> I have a simple description of what I'd like to do in Scilab, but done in a software named Mecway. The PDF is 650 kb (4 pages). I am worried about attaching such a document to the User Group here in general, but I can of course send it on request. In Mecway the axisymmetric model is expanded into 3D with hex8 elements (it looks like a basic cubic element). The force-function is applied in 40 time steps. It looks like 40 x basic static analysis. >> >> Please let me know what you think would be suitable for solving this problem. Is there a suitable ATOMS library? >> >> Best regards, >> Claus >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From cfuttrup at gmail.com Mon Jan 27 19:13:00 2020 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 27 Jan 2020 19:13:00 +0100 Subject: [Scilab-users] FEA in Scilab In-Reply-To: <6a16b32d1e0543349415c64478f4dabf@thalesgroup.com> References: <0D29E4C3-61C2-405A-8218-25B02A5666C3@me.com> <1c11e43d-e68a-da35-274f-5cb9bfac93fe@gmail.com> <6a16b32d1e0543349415c64478f4dabf@thalesgroup.com> Message-ID: Hi Denis I did a search in their documentation (it's offered on their web pages) for Scilab, and only found one hit which explains their arrays are set like matlab or scilab. Searching their modules library for "scilab" returned empty. I did a google search "scilab site:freefem.org" ... but nothing hints that freefem is somehow supporting integration with Scilab. Am I wrong? (Any pointers?) Best regards, Claus On 27.01.2020 18:35, CRETE Denis wrote: > Hello, > You can try freefem.org > HTH > Denis > > -----Message d'origine----- > De?: users [mailto:users-bounces at lists.scilab.org] De la part de Claus Futtrup > Envoy??: lundi 27 janvier 2020 18:32 > ??: users at lists.scilab.org > Objet?: Re: [Scilab-users] FEA in Scilab > > Hi > > I've searched for FreeFEM and found https://wiki.scilab.org/FreeFem ... > but the wiki returns that the page no longer exist. Do you know of > another link? > > Best regards, > Claus > > On 27.01.2020 16:01, Heinz Nabielek wrote: >> I would have no idea, if the report >> >> "Finite Elements in Scilab: Solution of partial differential equations supported by the FreeFEM toolbox" >> >> is any help. Dr van Seggern is long retired from the Forschungszentrum J?lich. >> Greetings >> Heinz >> >> >> >> >> FORSCHUNGSZENTRUM J?LICH GmbH >> Zentralinstitut f?r Angewandte Mathematik >> D-52425 J?lich, Tel. (02461) 61-6402 >> Interner Bericht >> Finite Elemente in Scilab:Das L?sen partieller Differentialgleichungen mit Hilfe der FreeFEM-Toolbox >> >> Rainer von Seggern >> FZJ-ZAM-IB-2001-03 >> April 2001 >> >>> On 27.01.2020, at 11:25, Claus Futtrup wrote: >>> >>> Dear fellow Scilabers >>> >>> There are various initiatives and possibly demonstration projects for implementing Finite Element algorithms and Analysis in Scilab. Please help me by providing pointers. >>> >>> What I'd like to simulate is the suspension of a loudspeaker (the cloth spider which essentially centers the voice coil in the air gap), in particular I wish to calculate a force-deflection curve. >>> >>> In my particular case, I'd like to describe the spider as a collection of line segments (straight lines as well as circular sections). This description represents a cross section view of the spider. For proper modeling, this is an axisymmetric model of the spider. >>> >>> I have a simple description of what I'd like to do in Scilab, but done in a software named Mecway. The PDF is 650 kb (4 pages). I am worried about attaching such a document to the User Group here in general, but I can of course send it on request. In Mecway the axisymmetric model is expanded into 3D with hex8 elements (it looks like a basic cubic element). The force-function is applied in 40 time steps. It looks like 40 x basic static analysis. >>> >>> Please let me know what you think would be suitable for solving this problem. Is there a suitable ATOMS library? >>> >>> Best regards, >>> Claus >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Mon Jan 27 20:18:11 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 27 Jan 2020 20:18:11 +0100 Subject: [Scilab-users] FEA in Scilab In-Reply-To: References: Message-ID: <69538894-bcc9-fbcb-6c61-00af4a15cb75@free.fr> Le 27/01/2020 ? 11:25, Claus Futtrup a ?crit?: > Dear fellow Scilabers > > There are various initiatives and possibly?demonstration projects for > implementing Finite Element algorithms and Analysis in Scilab. Please > help me by providing?pointers. > > What I'd like to simulate is the suspension of a loudspeaker (the > cloth spider which essentially centers the voice coil in the air gap), > in particular I wish to calculate a force-deflection curve. > > In my particular case, I'd like to describe the spider as a > collection?of line segments (straight lines as well as circular > sections). This description?represents a cross section view of the > spider. For proper modeling, this is an axisymmetric model of the spider. > > I have a simple description of what I'd like to do in Scilab, but done > in a software named Mecway. The PDF is 650 kb?(4 pages). I am worried > about attaching such a document to the User Group here in general, but > I can of course send it on request. In Mecway the axisymmetric?model > is expanded into 3D with hex8 elements (it looks like a basic cubic > element). The force-function is applied in 40 time steps. It looks > like 40 x basic static analysis. > > Please let me know what you think would be suitable for solving this > problem. Is there a suitable ATOMS library? sciFreeFEM, but it is not ported to Scilab 6: https://atoms.scilab.org/toolboxes/SciFreeFEM Samuel From cfuttrup at gmail.com Mon Jan 27 20:56:19 2020 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 27 Jan 2020 20:56:19 +0100 Subject: [Scilab-users] FEA in Scilab In-Reply-To: <69538894-bcc9-fbcb-6c61-00af4a15cb75@free.fr> References: <69538894-bcc9-fbcb-6c61-00af4a15cb75@free.fr> Message-ID: Hi Samuel Ah yes. This would be a great way to load a module and work on a FEA problem in Scilab. Is the maintainer (Yann Collette) still somewhere in the Scilab-sphere? Best regards, Claus On 27.01.2020 20:18, Samuel Gougeon wrote: > Le 27/01/2020 ? 11:25, Claus Futtrup a ?crit?: >> Dear fellow Scilabers >> >> There are various initiatives and possibly?demonstration projects for >> implementing Finite Element algorithms and Analysis in Scilab. Please >> help me by providing?pointers. >> >> What I'd like to simulate is the suspension of a loudspeaker (the >> cloth spider which essentially centers the voice coil in the air >> gap), in particular I wish to calculate a force-deflection curve. >> >> In my particular case, I'd like to describe the spider as a >> collection?of line segments (straight lines as well as circular >> sections). This description?represents a cross section view of the >> spider. For proper modeling, this is an axisymmetric model of the >> spider. >> >> I have a simple description of what I'd like to do in Scilab, but >> done in a software named Mecway. The PDF is 650 kb?(4 pages). I am >> worried about attaching such a document to the User Group here in >> general, but I can of course send it on request. In Mecway the >> axisymmetric?model is expanded into 3D with hex8 elements (it looks >> like a basic cubic element). The force-function is applied in 40 time >> steps. It looks like 40 x basic static analysis. >> >> Please let me know what you think would be suitable for solving this >> problem. Is there a suitable ATOMS library? > > > sciFreeFEM, but it is not ported to Scilab 6: > https://atoms.scilab.org/toolboxes/SciFreeFEM > > Samuel > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Mon Jan 27 21:10:27 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 27 Jan 2020 21:10:27 +0100 Subject: [Scilab-users] FEA in Scilab In-Reply-To: References: <69538894-bcc9-fbcb-6c61-00af4a15cb75@free.fr> Message-ID: <642e4ea0-d397-1e15-e80c-f8da51638c99@free.fr> Le 27/01/2020 ? 20:56, Claus Futtrup a ?crit?: > Hi Samuel > > Ah yes. This would be a great way to load a module and work on a FEA > problem in Scilab. Is the maintainer (Yann Collette) still somewhere > in the Scilab-sphere? In a 8 years sphere radius. Considering more carefully sciFreeFEM, apparently it allowed to deal only with 2D problems. So not really relevant for your user case. From stephane.mottelet at utc.fr Tue Jan 28 08:21:14 2020 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Tue, 28 Jan 2020 08:21:14 +0100 Subject: [Scilab-users] FEA in Scilab In-Reply-To: <642e4ea0-d397-1e15-e80c-f8da51638c99@free.fr> References: <642e4ea0-d397-1e15-e80c-f8da51638c99@free.fr> Message-ID: <6D6A16F7-743B-4916-9A4C-CBEB372899A9@utc.fr> Hi, For an axisymmetric problem 2D is ok. S. > Le 27 janv. 2020 ? 21:10, Samuel Gougeon a ?crit : > > ?Le 27/01/2020 ? 20:56, Claus Futtrup a ?crit : >> Hi Samuel >> >> Ah yes. This would be a great way to load a module and work on a FEA problem in Scilab. Is the maintainer (Yann Collette) still somewhere in the Scilab-sphere? > > In a 8 years sphere radius. > > Considering more carefully sciFreeFEM, apparently it allowed to deal only with 2D problems. > So not really relevant for your user case. > > > _______________________________________________ > users mailing list > users at lists.scilab.org > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users From fmiyara at fceia.unr.edu.ar Wed Jan 29 02:14:55 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Tue, 28 Jan 2020 22:14:55 -0300 Subject: [Scilab-users] FEA in Scilab In-Reply-To: References: Message-ID: <01966148-3226-1ac1-6b03-7b353aabbfd3@fceia.unr.edu.ar> Claus, I'm interested. Regards, Federico Miyara On 27/01/2020 07:25, Claus Futtrup wrote: > Dear fellow Scilabers > > There are various initiatives and possibly?demonstration projects for > implementing Finite Element algorithms and Analysis in Scilab. Please > help me by providing?pointers. > > What I'd like to simulate is the suspension of a loudspeaker (the > cloth spider which essentially centers the voice coil in the air gap), > in particular I wish to calculate a force-deflection curve. > > In my particular case, I'd like to describe the spider as a > collection?of line segments (straight lines as well as circular > sections). This description?represents a cross section view of the > spider. For proper modeling, this is an axisymmetric model of the spider. > > I have a simple description of what I'd like to do in Scilab, but done > in a software named Mecway. The PDF is 650 kb?(4 pages). I am worried > about attaching such a document to the User Group here in general, but > I can of course send it on request. In Mecway the axisymmetric?model > is expanded into 3D with hex8 elements (it looks like a basic cubic > element). The force-function is applied in 40 time steps. It looks > like 40 x basic static analysis. > > Please let me know what you think would be suitable for solving this > problem. Is there a suitable ATOMS library? > > Best regards, > Claus > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From aweeks at hidglobal.com Thu Jan 30 10:38:31 2020 From: aweeks at hidglobal.com (Adrian Weeks) Date: Thu, 30 Jan 2020 09:38:31 +0000 Subject: [Scilab-users] Problem with event handler. Message-ID: Hello, Could someone try running this piece of code to see what's going wrong, please? The purpose is to set up a display window with an associated event handler. Function 'Task' contains an endless loop in which some measurements would be made and the results displayed in the window. A mouse left click in the window should stop the endless loop allowing an exit from function 'Task' and moving on to the following lines of code. Using Scilab 5.4.1 (I know it's an older version but I've been using it for a long time and it works for me): If you place the caret at '// Point 1' and execute with E the code should work correctly as shown in Capture 1. If you place the caret at '//Point 2' and do the same the loop will work but Scilab will run past the call to 'Task' and execute the following lines x3, x4, x5 (Capture 2). I would expect it to stop in function 'Task' until the function is exited in the intended way by the mouse left click. Using Scilab 6.0.1 Scilab is almost totally unresponsive to the mouse click. Something goes on in the background and when it does eventually stop the results are like Capture 3, 4 & 5. The same over-run of function 'Task' occurs. Using a Dell Optiplex 3060, i3-8100 CPU, Win10 Enterprise. Am I missing something or is this a genuine bug? Many thanks. Adrian Weeks Development Engineer, Hardware Engineering EMEA Office: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 (0)2920 520178 aweeks at hidglobal.com [HID Global Logo] Unit 3, Cae Gwyrdd, Green meadow Springs, Cardiff, UK, CF15 7AB. www.hidglobal.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1751 bytes Desc: image001.gif URL: From jdb61858 at suoox.com Thu Jan 30 11:24:54 2020 From: jdb61858 at suoox.com (RolandB) Date: Thu, 30 Jan 2020 03:24:54 -0700 (MST) Subject: [Scilab-users] Problem with event handler. In-Reply-To: References: Message-ID: <1580379894297-0.post@n3.nabble.com> Hi, your problem could be realted to this bug: http://bugzilla.scilab.org/show_bug.cgi?id=15374 And/or this bug: http://bugzilla.scilab.org/show_bug.cgi?id=15996 Regards, Roland -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From jdb61858 at suoox.com Thu Jan 30 13:27:23 2020 From: jdb61858 at suoox.com (RolandB) Date: Thu, 30 Jan 2020 05:27:23 -0700 (MST) Subject: [Scilab-users] Next Scilab releaes? In-Reply-To: References: Message-ID: <1580387243907-0.post@n3.nabble.com> Hi, as the current master branch is often referred to as Scilab 6.1.0, I assume it will not just be a minor patch release. I would */highly/* recommend that a potential release date be announced and that the users be encouraged to test the current master build(s) on their scripts in order to find (and hopefully be able to fix) as many bugs as possible before the release. If you guys don't want to announce a release date, maybe you can announce a date where you recommend to file bug reports in order to at least still have a chance to get them fixed before the release. I remember reading in quite a few bug reports that the pre-release testing has to be more thoroughly with the next release. I hope that were not only empty words. Regards, Roland -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From mjmccann at ieee.org Thu Jan 30 14:59:14 2020 From: mjmccann at ieee.org (Michael J. McCann) Date: Thu, 30 Jan 2020 07:59:14 -0600 Subject: [Scilab-users] FEA in Scilab In-Reply-To: <01966148-3226-1ac1-6b03-7b353aabbfd3@fceia.unr.edu.ar> References: <01966148-3226-1ac1-6b03-7b353aabbfd3@fceia.unr.edu.ar> Message-ID: <96dc4cc5-3de0-43bb-6494-c08aa4d37b69@ieee.org> Federico, This isn't really an answer but I have in hand a book; "Introduction to? Finite and Spectral Element Methods Using MATLAB", ?C.Pozrikidis,???? CRC Press,? ? 2014 ? ? ISBN978.1.4822.0915.0 It might provide models for coding even if the dialect is different. Mike. On 1/28/2020 7:14 PM, Federico Miyara wrote: > > Claus, > > I'm interested. > > Regards, > > Federico Miyara > > > On 27/01/2020 07:25, Claus Futtrup wrote: >> Dear fellow Scilabers >> >> There are various initiatives and possibly?demonstration projects for >> implementing Finite Element algorithms and Analysis in Scilab. Please >> help me by providing?pointers. >> >> What I'd like to simulate is the suspension of a loudspeaker (the >> cloth spider which essentially centers the voice coil in the air >> gap), in particular I wish to calculate a force-deflection curve. >> >> In my particular case, I'd like to describe the spider as a >> collection?of line segments (straight lines as well as circular >> sections). This description?represents a cross section view of the >> spider. For proper modeling, this is an axisymmetric model of the spider. >> >> I have a simple description of what I'd like to do in Scilab, but >> done in a software named Mecway. The PDF is 650 kb?(4 pages). I am >> worried about attaching such a document to the User Group here in >> general, but I can of course send it on request. In Mecway the >> axisymmetric?model is expanded into 3D with hex8 elements (it looks >> like a basic cubic element). The force-function is applied in 40 time >> steps. It looks like 40 x basic static analysis. >> >> Please let me know what you think would be suitable for solving this >> problem. Is there a suitable ATOMS library? >> >> Best regards, >> Claus >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Note: Email address is now 'mjmccann at ieee.org' not 'iee.org' -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Thu Jan 30 15:21:14 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 30 Jan 2020 15:21:14 +0100 Subject: [Scilab-users] Problem with event handler. In-Reply-To: References: Message-ID: <7002bb9a-f29a-6238-83c8-d4033f667e2f@laas.fr> Hello Adrian, I don't see any piece of scilab code attached to your message. Did you forget it? Antoine Le 30/01/2020 ? 10:38, Adrian Weeks a ?crit?: > > Hello, > > Could someone try running this piece of code to see what?s going > wrong, please? > > The purpose is to set up a display window with an associated event > handler. > > Function ?Task? contains an endless loop in which some measurements > would be made and the results displayed in the window. > > A mouse left click in the window should stop the endless loop allowing > an exit from function ?Task? and moving on to the following lines of code. > > Using Scilab 5.4.1? (I know it?s an older version but I?ve been using > it for a long time and it works for me): > > If you place the caret at ??// Point 1? and execute with E the > code should work correctly as shown in Capture 1. > > If you place the caret at ?//Point 2? and do the same the loop will > work but Scilab will run past? the call to ?Task? and execute the > following lines x3, x4, x5 (Capture 2).? I would expect it to stop in > function ?Task? until the function is exited in the intended way by > the mouse left click. > > Using Scilab 6.0.1 > > Scilab is almost totally unresponsive to the mouse click.? Something > goes on in the background and when it does eventually stop the results > are like Capture 3, 4 & 5.? The same over-run of function ?Task? occurs. > > Using a Dell Optiplex 3060, i3-8100 CPU, Win10 Enterprise. > > Am I missing something or is this a genuine bug? > > Many thanks. > > Adrian Weeks > Development Engineer, Hardware Engineering EMEA > Office: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 > (0)2920 520178 > aweeks at hidglobal.com > > HID Global Logo > > Unit 3, Cae Gwyrdd, > Green meadow Springs, > Cardiff, UK, > CF15 7AB. > www.hidglobal.com > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1751 bytes Desc: not available URL: From cfuttrup at gmail.com Thu Jan 30 16:49:19 2020 From: cfuttrup at gmail.com (Claus Futtrup) Date: Thu, 30 Jan 2020 16:49:19 +0100 Subject: [Scilab-users] FEA in Scilab In-Reply-To: <96dc4cc5-3de0-43bb-6494-c08aa4d37b69@ieee.org> References: <01966148-3226-1ac1-6b03-7b353aabbfd3@fceia.unr.edu.ar> <96dc4cc5-3de0-43bb-6494-c08aa4d37b69@ieee.org> Message-ID: <630b87c9-5bcc-abed-daa5-b6f5af41c71e@gmail.com> Hi Michael I'm the thread starter. Good point that one could look in MATLAB for inspiration. I am not so much interested in creating a FEA program (or API) myself in Scilab, but if anything exist today which to some extent is in development or service (maintenance), then I'd be inclined to try this. ... Conclusion seems to be, this is not the case. Best regards, Claus On 30.01.2020 14:59, Michael J. McCann wrote: > Federico, > This isn't really an answer but I have in hand a book; > > "Introduction to? Finite and Spectral Element Methods Using MATLAB", > ?C.Pozrikidis,???? CRC Press,? ? 2014 ? ? ISBN978.1.4822.0915.0 > It might provide models for coding even if the dialect is different. > > Mike. > > On 1/28/2020 7:14 PM, Federico Miyara wrote: >> >> Claus, >> >> I'm interested. >> >> Regards, >> >> Federico Miyara >> >> >> On 27/01/2020 07:25, Claus Futtrup wrote: >>> Dear fellow Scilabers >>> >>> There are various initiatives and possibly?demonstration projects >>> for implementing Finite Element algorithms and Analysis in Scilab. >>> Please help me by providing?pointers. >>> >>> What I'd like to simulate is the suspension of a loudspeaker (the >>> cloth spider which essentially centers the voice coil in the air >>> gap), in particular I wish to calculate a force-deflection curve. >>> >>> In my particular case, I'd like to describe the spider as a >>> collection?of line segments (straight lines as well as circular >>> sections). This description?represents a cross section view of the >>> spider. For proper modeling, this is an axisymmetric model of the >>> spider. >>> >>> I have a simple description of what I'd like to do in Scilab, but >>> done in a software named Mecway. The PDF is 650 kb?(4 pages). I am >>> worried about attaching such a document to the User Group here in >>> general, but I can of course send it on request. In Mecway the >>> axisymmetric?model is expanded into 3D with hex8 elements (it looks >>> like a basic cubic element). The force-function is applied in 40 >>> time steps. It looks like 40 x basic static analysis. >>> >>> Please let me know what you think would be suitable for solving this >>> problem. Is there a suitable ATOMS library? >>> >>> Best regards, >>> Claus >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -- > Note: Email address is now 'mjmccann at ieee.org' not 'iee.org' > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From aweeks at hidglobal.com Thu Jan 30 17:08:02 2020 From: aweeks at hidglobal.com (Adrian Weeks) Date: Thu, 30 Jan 2020 16:08:02 +0000 Subject: [Scilab-users] [EXT] Re: Problem with event handler. In-Reply-To: <7002bb9a-f29a-6238-83c8-d4033f667e2f@laas.fr> References: <7002bb9a-f29a-6238-83c8-d4033f667e2f@laas.fr> Message-ID: Hi Antoine, Yes, I sent the mail without attachments, then realised my mistake and sent it again with. If you can't find the second mail please let me know and I'll send it again. Thank you. Adrian Weeks Development Engineer, Hardware Engineering EMEA Office: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 (0)2920 520178 aweeks at hidglobal.com [HID Global Logo] Unit 3, Cae Gwyrdd, Green meadow Springs, Cardiff, UK, CF15 7AB. www.hidglobal.com From: users On Behalf Of Antoine Monmayrant Sent: 30 January 2020 14:21 To: users at lists.scilab.org Subject: [EXT] Re: [Scilab-users] Problem with event handler. *** Please use caution this is an externally originating email. *** Hello Adrian, I don't see any piece of scilab code attached to your message. Did you forget it? Antoine Le 30/01/2020 ? 10:38, Adrian Weeks a ?crit : Hello, Could someone try running this piece of code to see what's going wrong, please? The purpose is to set up a display window with an associated event handler. Function 'Task' contains an endless loop in which some measurements would be made and the results displayed in the window. A mouse left click in the window should stop the endless loop allowing an exit from function 'Task' and moving on to the following lines of code. Using Scilab 5.4.1 (I know it's an older version but I've been using it for a long time and it works for me): If you place the caret at '// Point 1' and execute with E the code should work correctly as shown in Capture 1. If you place the caret at '//Point 2' and do the same the loop will work but Scilab will run past the call to 'Task' and execute the following lines x3, x4, x5 (Capture 2). I would expect it to stop in function 'Task' until the function is exited in the intended way by the mouse left click. Using Scilab 6.0.1 Scilab is almost totally unresponsive to the mouse click. Something goes on in the background and when it does eventually stop the results are like Capture 3, 4 & 5. The same over-run of function 'Task' occurs. Using a Dell Optiplex 3060, i3-8100 CPU, Win10 Enterprise. Am I missing something or is this a genuine bug? Many thanks. Adrian Weeks Development Engineer, Hardware Engineering EMEA Office: +44 (0)2920 528500 | Desk: +44 (0)2920 528523 | Fax: +44 (0)2920 520178 aweeks at hidglobal.com [HID Global Logo] Unit 3, Cae Gwyrdd, Green meadow Springs, Cardiff, UK, CF15 7AB. www.hidglobal.com _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1751 bytes Desc: image001.gif URL: From heinznabielek at me.com Thu Jan 30 23:25:06 2020 From: heinznabielek at me.com (Heinz Nabielek) Date: Thu, 30 Jan 2020 23:25:06 +0100 Subject: [Scilab-users] Fitting correlations to measured data. Write-ups of leastsq is messy ... Message-ID: Scilab is a great and powerful mathematical tool that can be used for fitting correlations to measured data. For me, the help functions and literature write-ups for least-squares fitting in Scilab were tedious and I found them difficult to follow. At an elementary level, I have sorted out my problems. I would like to report on it, but I am grateful for any further suggestions. First: linear least-squares fitting: with measurement data x=[2 7 12]'; y=[2 4.5 6.5]'; it is easy, to fit a straight line and plot it: M=[ones(x) x]; a=M\y; plot2d(x,M*a); plot(x,y,'r.'); Strangely, you find the recipe under "backslash" and this is not very straightforward. The method is really neat, because you can easily fit a polynomial of 25th order or any correlation that is linear in the parameters. Correlations not linear in the parameters need non-linear least-squares fitting, e.g. with "leastsq", where the Scilab help function is terribly complex. In my case, I wanted to simultaneously fit three straight lines through three measurement series with the condition that all 3 lines start at the same point on the x-axis. So the following worked well for me: x=[2 7 12]'; y=[2 4.5 6.5]'; y1=[1 2 3]'; y2=[0 1 1.4]'; par0 = [.5 .15 .09 -5]; function e=err(par, x,y,y1,y2) e= [y-par(1)*(x+par(4)); y1-par(2)*(x+par(4)); y2-par(3)*(x+par(4))] endfunction [f,paropt] = leastsq ( list(err,x,y,y1,y2), par0); plot(x,[y y1 y2],'.'); xx=-5:15; plot(xx,paropt(1)*(xx+paropt(4)),'b--'); plot(xx,paropt(2)*(xx+paropt(4)),'g--'); plot(xx,paropt(3)*(xx+paropt(4)),'r--'); I guess there are more elegant ways to write this code, are they? I find write-ups of leastsq in the help function and in Scilab books terribly messy.... Greetings Heinz PS: Why do I need "list" in the leastsq function call? From perrichon.pierre at wanadoo.fr Fri Jan 31 08:28:44 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Fri, 31 Jan 2020 08:28:44 +0100 Subject: [Scilab-users] Scilab Nigthly build - bugzilla 16308 Message-ID: Hello Samuel Is there a way to load nigthly build version, as it existed in the past : apparently not available on the new download site Sincerely Pierre P. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Fri Jan 31 09:08:26 2020 From: arctica1963 at gmail.com (arctica1963) Date: Fri, 31 Jan 2020 01:08:26 -0700 (MST) Subject: [Scilab-users] Double and triple integral query In-Reply-To: <91a1c1e0-c83b-d0bb-c602-480b6dbbe308@free.fr> References: <91a1c1e0-c83b-d0bb-c602-480b6dbbe308@free.fr> Message-ID: <1580458106299-0.post@n3.nabble.com> 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 From Christophe.Dang at sidel.com Fri Jan 31 09:59:04 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 31 Jan 2020 08:59:04 +0000 Subject: [Scilab-users] Fitting correlations to measured data. Write-ups of leastsq is messy ... Message-ID: Hello, > De : Heinz Nabielek > Envoy? : jeudi 30 janvier 2020 23:25 > > First: linear least-squares fitting: with measurement data x=[2 7 12]'; y=[2 4.5 > 6.5]'; it is easy, to fit a straight line and plot it: > M=[ones(x) x]; a=M\y; plot2d(x,M*a); plot(x,y,'r.'); > [...] > In my case, I wanted to simultaneously fit three straight lines through three > measurement series with the condition that all 3 lines start at the same point > on the x-axis. So the following worked well for me: > > x=[2 7 12]'; y=[2 4.5 6.5]'; y1=[1 2 3]'; y2=[0 1 1.4]'; par0 = [.5 .15 .09 -5]; > function e=err(par, x,y,y1,y2) > e= [y-par(1)*(x+par(4)); y1-par(2)*(x+par(4)); y2-par(3)*(x+par(4))] > endfunction > > [f,paropt] = leastsq ( list(err,x,y,y1,y2), par0); For this specific case, you might consider this: You can use a linear law that goes through zero with a linear regression just by removing the column of ones: A = x\y You can thus improve the speed by a factor 8 : ---------- x=[2 7 12]'; y=[2 4.5 6.5]'; y1=[1 2 3]'; y2=[0 1 1.4]'; par0 = [.5 .15 .09 -5]; par01 = -5; function e=err(par, x,y,y1,y2) e= [y-par(1)*(x+par(4)); y1-par(2)*(x+par(4)); y2-par(3)*(x+par(4))] endfunction function e=err1(par, x,y,y1,y2) A = (x + par)\y; A1 = (x + par)\y1; A2 = (x + par)\y2; e= [y-A*(x+par); y1-A1*(x+par); y2-A2*(x+par)] endfunction tic(); [f,paropt] = leastsq ( list(err,x,y,y1,y2), par0); t1=toc(); figure(0); clf(); plot(x,[y y1 y2],'.'); xx=[5, 15]; plot(xx,paropt(1)*(xx+paropt(4)),'b--'); plot(xx,paropt(2)*(xx+paropt(4)),'g--'); plot(xx,paropt(3)*(xx+paropt(4)),'r--'); tic(); [f,paropt1] = leastsq ( list(err1,x,y,y1,y2), par01); A = (x+paropt1)\y; A1 = (x+paropt1)\y1; A2 = (x+paropt1)\y2; t2=toc(); figure(1); clf(); plot(x,[y y1 y2],'.'); xx=[5, 15]; plot(xx,A.*(xx+paropt1),'b--'); plot(xx,A1.*(xx+paropt1),'g--'); plot(xx,A2.*(xx+paropt1),'r--'); disp("t1 = " + string(t1) + " ; t2 = " + string(t2) +... " ; t1/t2 = " + string(t1/t2)); ---------- -- Christophe Dang Ngoc Chan Mechanical calculation engineer General This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From sgougeon at free.fr Fri Jan 31 12:15:29 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 31 Jan 2020 12:15:29 +0100 Subject: [Scilab-users] Scilab Nigthly build - bugzilla 16308 In-Reply-To: References: Message-ID: Hello Pierre, Le 31/01/2020 ? 08:28, Perrichon a ?crit?: > > Hello Samuel > > Is there a way to load nigthly build version, as it existed in the > past : apparently not available on the new download site > Nighly build are replaced with the Continuous Build, that can change several times a day according to the activity on the main Scilab forge. As answered in Bugzilla, currently the Continuous Build version is the master one. It can be found and downloaded there: Overview: https://build.scilab.org/view/Scilab%20binaries/ Windows: https://build.scilab.org/view/Scilab%20binaries/job/scilab-master-windows-64/lastSuccessfulBuild/artifact/scilab-branch-master_x64.exe Linux: https://build.scilab.org/view/Scilab%20binaries/job/scilab-master-linux-64/lastSuccessfulBuild/artifact/scilab-branch-master-linux-x86_64.tar.gz The issue with the anti-virus software on your computer is independent from the access to Continuous Build binaries. Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: