From heinznabielek at me.com Sat Aug 1 16:45:33 2020 From: heinznabielek at me.com (Heinz Nabielek) Date: Sat, 1 Aug 2020 16:45:33 +0200 Subject: [Scilab-users] the linear least-squares fitting problem Message-ID: Dear Scilabers, for mathematicians, the linear least-squares fitting is a trivial problem, but as an experimental physicist I had problems finding the right correlations for predicting the Confidence Limits of the fitted functional relationship. For a trivial set of experimental data, I wrote a few lines of Scilab code and have 2 questions: - is the computation of confidence limits correct? - for large data sets and higher degree polynomials, can we make the computations more efficient and reliable? Thanks in advance Heinz _________________________ x=[0.1269868 0.135477 0.221034 0.45 0.8350086 0.9057919 0.9133759 0.9688678]'; y=[0.0695843 0.0154644 0.0893982 0.5619441 1.3879476 1.5639274 1.6570076 1.9061488]'; plot(x,y,'m.','markersize',14);xgrid(1,1,1); X=[ones(x) x x^2]; // matrix of independent vectors b=X\y; // parameters of linear LSFIT with a 2nd degree polynomial yh = X*b; //Fitted values yh to approximate measured y's e=y-yh; //Errors or residuals SSE=e'*e; //Sum of squared errors ybar=mean(y); R2=1-SSE/sum((y-ybar)^2); [m n]=size(X); MSE = SSE/(m-n-1); //Mean square error se=sqrt(MSE); C=MSE*inv(X'*X); seb=sqrt(diag(C)); CONF=.95; alpha=1-CONF; ta2 = cdft('T',m-n,1-alpha/2,alpha/2); //t-value for alpha/2 xx=(0.1:.025:1)'; // cover the whole abscissa range in detail XX=[ones(xx) xx xx^2]; yhh=XX*b; // predicted extended LSFIT curve plot(xx,yhh,'kd-','MarkerSize',8); [mm n]=size(XX); sY = []; sYp = []; //Terms involved in Confidence Interval for Y, Ypred for i=1:mm; sY = [sY; sqrt(XX(i,:)*C*XX(i,:)')]; // standard error in fit sYp = [sYp; se*sqrt(1+XX(i,:)*(C/se)*XX(i,:)')]; // standard error in spread in population distribution end; plot(xx, yhh+ta2*sYp,'rd-'); plot(xx, yhh+ta2*sY,'bd-'); plot(xx, yhh-ta2*sY,'gd-'); plot(xx, yhh-ta2*sYp,'md-'); title('LINEAR LEAST-SQUARES FIT WITH 95% CONFIDENCE BOUNDS ON FIT AND ON THE POPULATION SPREAD','fontsize',2); xlabel('x-values','fontsize',5); ylabel('y-values','fontsize',5); legend('measurement data','LSFIT of 2nd order polynomial','upper 95% CL population','upper 95% CL fit','lower 95% CL fit','lower 95% CL population',2); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LINEAR LEAST-SQUARES FIT WITH 95% CONFIDENCE BOUNDS ON FIT AND ON THE POPULATION SPREAD.pdf Type: application/pdf Size: 48278 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From fla.muff at hotmail.com Wed Aug 5 10:24:16 2020 From: fla.muff at hotmail.com (flavio muff) Date: Wed, 5 Aug 2020 08:24:16 +0000 Subject: [Scilab-users] Scilab - Xcos In-Reply-To: References: , , , , , Message-ID: Hi everyone I have a problem in Xcos (Scilab 6.1.0). When I do a Superblock - mask it - I can not choose any variables and not edit (I set them in context and tried define the variables in the console as well, but they are not recognized). I add lines in the superblock - mask - GUI, try define a variable but I cant confirm with ok. I already tried set the variables firstly in the context (otherwise i cant use a variable in the diagram), firstly mask and then customize, firstly customize and then mask - it doesnt work. I tried same procedure with Scilab 5.5.2. Masking works without any problems, but this version crashes when I want save the Xcos file.. I am using the latest scilab version 6.1.0 / 64bit on win 10. I so hope there is a solution. Thanks much in advance and regards FMuff -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimoto2005 at gmail.com Sat Aug 8 05:49:01 2020 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Fri, 7 Aug 2020 20:49:01 -0700 (MST) Subject: [Scilab-users] Jordan normal form In-Reply-To: References: <1595770751098-0.post@n3.nabble.com> <4526a7ce-3644-79fe-f368-b3c42d05b87a@free.fr> <1595774007928-0.post@n3.nabble.com> <5c3f6105-9a23-96fb-c54e-ff7674d2d40c@free.fr> <1595783593642-0.post@n3.nabble.com> Message-ID: <1596858541682-0.post@n3.nabble.com> Dear Samuel, I'm sorry that I'm looking for a external program and my reply is late. Unfortunately, the program does not exist. It seems due to an unstable numerical result of Jordan normal form. There is a paper that the jordan function of matlab produces wrong result for a certain matrix. Papers on the algorithms have been sometimes published and I read them. Best regards, Masahiro Fujimoto -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From noguchi.japan at gmail.com Sat Aug 8 10:56:10 2020 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 8 Aug 2020 01:56:10 -0700 (MST) Subject: [Scilab-users] How to define the Y Range of plot Message-ID: <1596876970366-0.post@n3.nabble.com> Hello, I would like to define the Y Range of plot. Could you tell me the Scilibe code to realize this. If I use the plot command, Y range is automatically set by Scilab. I would like to set the Y range, e.g. min -10 to Max 20. Thanks for your advise -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sdr at durietz.se Sat Aug 8 11:24:50 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 8 Aug 2020 11:24:50 +0200 Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: <1596876970366-0.post@n3.nabble.com> References: <1596876970366-0.post@n3.nabble.com> Message-ID: <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> Hello, --> help data_bounds Regards Stefan On 2020-08-08 10:56, Fukashiimo wrote: > Hello, > > I would like to define the Y Range of plot. Could you tell me the Scilibe > code to realize this. > If I use the plot command, Y range is automatically set by Scilab. > I would like to set the Y range, e.g. min -10 to Max 20. > > Thanks for your advise > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From noguchi.japan at gmail.com Sat Aug 8 11:42:46 2020 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 8 Aug 2020 02:42:46 -0700 (MST) Subject: [Scilab-users] How to define the Y Range of plot Message-ID: <1596879766811-0.post@n3.nabble.com> Hello, I would like to define the Y Range of plot. Could you tell me the Scilibe code to realize this. If I use the plot command, Y range is automatically set by Scilab. I would like to set the Y range, e.g. min -10 to Max 20. Thanks for your advise -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From noguchi.japan at gmail.com Sat Aug 8 12:15:10 2020 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 8 Aug 2020 03:15:10 -0700 (MST) Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> References: <1596876970366-0.post@n3.nabble.com> <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> Message-ID: <1596881710031-0.post@n3.nabble.com> Hello, Mr. Stefan, Thanks. Could you please tell me how to se it? I tried the following code. My intention is to define X: from -0.5 to +0,5 and Y from -2 to +2. However, plot command didn't work as I expected. Any idea? cafix.data_bounds = [-0.5,-2;0.5,2]; cafix.tight_limits="on"; cafix.auto_scale="off"; set(gca(),"data_bounds", cafix.data_bounds); Thanks -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sdr at durietz.se Sat Aug 8 12:55:01 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 8 Aug 2020 12:55:01 +0200 Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: <1596881710031-0.post@n3.nabble.com> References: <1596876970366-0.post@n3.nabble.com> <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> <1596881710031-0.post@n3.nabble.com> Message-ID: <6ba5226b-cb98-c780-01bf-f8060783c968@durietz.se> Sorry for a wrong letter in my previous mail! Hello Fukashiimo, 1. get the handle of your axes: --> cafix = gca(); 2. set the properties: --> cafix.tight_limits="on"; --> cafix.auto_scale="off"; --> cafix.data_bounds = [-0.5,-2;0.5,2]; Regards Stefan On 2020-08-08 12:15, Fukashiimo wrote: > Hello, Mr. Stefan, > > Thanks. Could you please tell me how to se it? > I tried the following code. My intention is to define X: from -0.5 to +0,5 > and Y from -2 to +2. > However, plot command didn't work as I expected. Any idea? > > cafix.data_bounds = [-0.5,-2;0.5,2]; > cafix.tight_limits="on"; > cafix.auto_scale="off"; > set(gca(),"data_bounds", cafix.data_bounds); > > > Thanks > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From noguchi.japan at gmail.com Sat Aug 8 15:03:54 2020 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 8 Aug 2020 06:03:54 -0700 (MST) Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: <6ba5226b-cb98-c780-01bf-f8060783c968@durietz.se> References: <1596876970366-0.post@n3.nabble.com> <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> <1596881710031-0.post@n3.nabble.com> <6ba5226b-cb98-c780-01bf-f8060783c968@durietz.se> Message-ID: <1596891834222-0.post@n3.nabble.com> Hello, Mr. Stefan, Thanks. Should we put following codes before each plot command? cafix = gca(); cafix.tight_limits="on"; cafix.auto_scale="off"; cafix.data_bounds = [-0.5,-2;0.5,2]; -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sdr at durietz.se Sat Aug 8 15:08:20 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 8 Aug 2020 15:08:20 +0200 Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: <1596891834222-0.post@n3.nabble.com> References: <1596876970366-0.post@n3.nabble.com> <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> <1596881710031-0.post@n3.nabble.com> <6ba5226b-cb98-c780-01bf-f8060783c968@durietz.se> <1596891834222-0.post@n3.nabble.com> Message-ID: Hello, not before but after! Stefan On 2020-08-08 15:03, Fukashiimo wrote: > Hello, Mr. Stefan, > > Thanks. > > Should we put following codes before each plot command? > > cafix = gca(); > cafix.tight_limits="on"; > cafix.auto_scale="off"; > cafix.data_bounds = [-0.5,-2;0.5,2]; > > > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Sat Aug 8 16:15:42 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 8 Aug 2020 16:15:42 +0200 Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: References: <1596876970366-0.post@n3.nabble.com> <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> <1596881710031-0.post@n3.nabble.com> <6ba5226b-cb98-c780-01bf-f8060783c968@durietz.se> <1596891834222-0.post@n3.nabble.com> Message-ID: That is if you want to change the data_ bounds each time (for very different data). I thought that was what you wanted. Otherwise you could use it only once after the first plot, or even before if you have no other figure open. (thanks Samuel!) On 2020-08-08 15:08, Stefan Du Rietz wrote: > Hello, not before but after! > > Stefan > > > On 2020-08-08 15:03, Fukashiimo wrote: >> Hello, Mr. Stefan, >> >> Thanks. >> >> Should we put following codes before each plot command? >> >> cafix = gca(); >> cafix.tight_limits="on"; >> cafix.auto_scale="off"; >> cafix.data_bounds = [-0.5,-2;0.5,2]; >> >> >> >> >> >> -- >> Sent from: >> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html >> >> _______________________________________________ >> 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 noguchi.japan at gmail.com Sat Aug 8 23:25:45 2020 From: noguchi.japan at gmail.com (Fukashiimo) Date: Sat, 8 Aug 2020 14:25:45 -0700 (MST) Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: References: <1596876970366-0.post@n3.nabble.com> <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> <1596881710031-0.post@n3.nabble.com> <6ba5226b-cb98-c780-01bf-f8060783c968@durietz.se> <1596891834222-0.post@n3.nabble.com> Message-ID: <1596921945648-0.post@n3.nabble.com> Hello, Mr. Stefan, Thanks. plot (X,Y); cafix = gca(); cafix.tight_limits="on"; cafix.auto_scale="off"; cafix.data_bounds = [-0.5,-2;0.5,2]; set(gca(),"data_bounds", cafix.data_bounds); -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From sdr at durietz.se Sat Aug 8 23:33:58 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 8 Aug 2020 23:33:58 +0200 Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: <1596921945648-0.post@n3.nabble.com> References: <1596876970366-0.post@n3.nabble.com> <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> <1596881710031-0.post@n3.nabble.com> <6ba5226b-cb98-c780-01bf-f8060783c968@durietz.se> <1596891834222-0.post@n3.nabble.com> <1596921945648-0.post@n3.nabble.com> Message-ID: Hello Fukashiimo, you don't nedd the last line! All is already done by the previous lines. Stefan On 2020-08-08 23:25, Fukashiimo wrote: > Hello, Mr. Stefan, > > Thanks. > > > > plot (X,Y); > cafix = gca(); > cafix.tight_limits="on"; > cafix.auto_scale="off"; > cafix.data_bounds = [-0.5,-2;0.5,2]; > set(gca(),"data_bounds", cafix.data_bounds); > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sdr at durietz.se Sat Aug 8 23:55:56 2020 From: sdr at durietz.se (Stefan Du Rietz) Date: Sat, 8 Aug 2020 23:55:56 +0200 Subject: [Scilab-users] How to define the Y Range of plot In-Reply-To: References: <1596876970366-0.post@n3.nabble.com> <1ac47703-701c-4217-d41e-1eda81efd7ea@durietz.se> <1596881710031-0.post@n3.nabble.com> <6ba5226b-cb98-c780-01bf-f8060783c968@durietz.se> <1596891834222-0.post@n3.nabble.com> <1596921945648-0.post@n3.nabble.com> Message-ID: <2ba0fe47-c68f-b618-84c5-d893033976e1@durietz.se> You don't *need* it, of course ;-) cafix is the handle of your axes from plot() which you got with gca(). You can then set the properties of it with the dot method. Stefan On 2020-08-08 23:33, Stefan Du Rietz wrote: > Hello Fukashiimo, you don't nedd the last line! All is already done by > the previous lines. > > Stefan > > > On 2020-08-08 23:25, Fukashiimo wrote: >> Hello, Mr. Stefan, >> >> Thanks. >> >> >> >> plot (X,Y); >> cafix = gca(); >> cafix.tight_limits="on"; >> cafix.auto_scale="off"; >> cafix.data_bounds = [-0.5,-2;0.5,2]; >> set(gca(),"data_bounds", cafix.data_bounds); >> >> >> >> -- >> Sent from: >> http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html >> >> _______________________________________________ >> 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 rene.djack13 at gmail.com Sun Aug 9 13:21:25 2020 From: rene.djack13 at gmail.com (Rene Djack) Date: Sun, 9 Aug 2020 13:21:25 +0200 Subject: [Scilab-users] Image Processing and Computer Vision module IPCV Message-ID: Hello, Have done atomsInstall("IPCV") Restarted scilab and get the message: Start IPCV 4.1.2 for scilab 6.0 Image Processing and Computer Vision ........... Error: cannot load some dependencies link: library not loaded: libopencv_world.so Cannot open the file ... Is there somebody who success with a same config than mine: Ubuntu 20.04 Scilab 6.1.0 (from scilab-6.1.0.bin.linux-x86-64.tar.gz ) Regards, Ren? -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh.tan at bytecode-asia.com Sun Aug 9 17:14:36 2020 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Sun, 09 Aug 2020 23:14:36 +0800 Subject: [Scilab-users] Image Processing and Computer Vision module IPCV In-Reply-To: References: Message-ID: <173d3c9ad67.ae7e6f72571389.2209043949457703639@bytecode-asia.com> Hi,? For Ubuntu 20.04, you would need to recompile the OPENCV Lib. I would release the pre-compile lib for Ubuntu 20.04 in a month time if you could wait. Thanks. Regards, Chin Luh ---- On Sun, 09 Aug 2020 19:21:25 +0800 Rene Djack wrote ---- Hello, Have done atomsInstall("IPCV")? Restarted scilab and get the message: Start IPCV 4.1.2 for scilab 6.0 Image Processing and Computer Vision? ........... Error: cannot load some dependencies link: library not loaded: libopencv_world.so Cannot open the file ... Is there somebody who success with a same config than mine: ? Ubuntu 20.04 Scilab 6.1.0 (from scilab-6.1.0.bin.linux-x86-64.tar.gz ) Regards, Ren?? _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From rene.djack13 at gmail.com Sun Aug 9 18:31:09 2020 From: rene.djack13 at gmail.com (Rene Djack) Date: Sun, 9 Aug 2020 18:31:09 +0200 Subject: [Scilab-users] Image Processing and Computer Vision module IPCV In-Reply-To: <173d3c9ad67.ae7e6f72571389.2209043949457703639@bytecode-asia.com> References: <173d3c9ad67.ae7e6f72571389.2209043949457703639@bytecode-asia.com> Message-ID: Hi, I prefer to wait for a bin. Thanks a lot Ren? Le dim. 9 ao?t 2020 ? 17:15, Chin Luh Tan a ?crit : > Hi, > > For Ubuntu 20.04, you would need to recompile the OPENCV Lib. > > I would release the pre-compile lib for Ubuntu 20.04 in a month time if > you could wait. > > Thanks. > > Regards, > Chin Luh > > > ---- On Sun, 09 Aug 2020 19:21:25 +0800 *Rene Djack > >* wrote ---- > > Hello, > > Have done atomsInstall("IPCV") > Restarted scilab and get the message: > > Start IPCV 4.1.2 for scilab 6.0 > Image Processing and Computer Vision > ........... > Error: cannot load some dependencies > link: library not loaded: libopencv_world.so > Cannot open the file ... > > Is there somebody who success with a same config than mine: > > > Ubuntu 20.04 > Scilab 6.1.0 (from scilab-6.1.0.bin.linux-x86-64.tar.gz ) > > Regards, > Ren? > _______________________________________________ > 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: From chinluh.tan at bytecode-asia.com Sun Aug 9 18:35:53 2020 From: chinluh.tan at bytecode-asia.com (Chin Luh Tan) Date: Mon, 10 Aug 2020 00:35:53 +0800 Subject: [Scilab-users] Image Processing and Computer Vision module IPCV In-Reply-To: References: <173d3c9ad67.ae7e6f72571389.2209043949457703639@bytecode-asia.com> Message-ID: <173d414167d.e87f876a570937.2371297807791202171@bytecode-asia.com> Hi,? Great. Will try to speed it up, delay due to covid-19, fighting for survivability, you could try to use VM with Ubuntu 1804 for the meantime. rgds, CL ---- On Mon, 10 Aug 2020 00:31:09 +0800 Rene Djack wrote ---- Hi, I prefer to wait for a bin. Thanks a lot Ren??? Le dim. 9 ao?t 2020 ? 17:15, Chin Luh Tan a ?crit?: Hi,? For Ubuntu 20.04, you would need to recompile the OPENCV Lib. I would release the pre-compile lib for Ubuntu 20.04 in a month time if you could wait. Thanks. Regards, Chin Luh ---- On Sun, 09 Aug 2020 19:21:25 +0800 Rene Djack wrote ---- Hello, Have done atomsInstall("IPCV")? Restarted scilab and get the message: Start IPCV 4.1.2 for scilab 6.0 Image Processing and Computer Vision? ........... Error: cannot load some dependencies link: library not loaded: libopencv_world.so Cannot open the file ... Is there somebody who success with a same config than mine: ? Ubuntu 20.04 Scilab 6.1.0 (from scilab-6.1.0.bin.linux-x86-64.tar.gz ) Regards, Ren?? _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list mailto:users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list mailto: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 Tue Aug 11 17:37:26 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 11 Aug 2020 17:37:26 +0200 Subject: [Scilab-users] Changing the fontname for the content of a table uicontrol Message-ID: Dear all, I am struggling with changing the .fontname property for the content of a table uicontrol. The default font is "Tahoma", that is not monospaced. I would like to set a monospaced font, like "Monospaced", "Consolas", etc that are available on my system, as reported by xlfont("AVAILABLE_FONTS"). xlfont("Consolas")? // works well: --> xlfont ?ans? = ???????? column 1 to 7 *"Monospaced"*? "ScilabSymbols"? "Serif"? "Serif Italic"? "Serif Bold"? "Serif Bold Italic"? "SansSerif" ???????? column 8 to 11 ? "SansSerif Italic"? "SansSerif Bold"? "SansSerif Bold Italic"? "SansSerif Bold Italic" --> xlfont("Consolas"); --> xlfont ?ans? = ???????? column 1 to 7 *"Monospaced" *"ScilabSymbols"? "Serif"? "Serif Italic"? "Serif Bold"? "Serif Bold Italic"? "SansSerif" ???????? column 8 to 12 ? "SansSerif Italic"? "SansSerif Bold"? "SansSerif Bold Italic"? "SansSerif Bold Italic" *"Consolas"* But the, when i set it to the uicontrol, the rendering does not change: xlfont() table = [ "" "A" "B" "C" "D" "1" "try" "catch" "abs" "evstr" "2" "do" "members" "while" "sin" "3" "cos" "isascii" "linspace" "tan" ]; f = gcf(); clf as = f.axes_size; // [width height] ut = uicontrol("style","table", "string",table,"FontName","Consolas", .. "position", [5 as(2)-100 300 100]); // =>@top left corner of figure // No change in the display, even after resizing a bit the figure (sometimes required to update the display). Yet, the property has well been assigned: --> ut.fontnameans ="Consolas" Does anyone experiment the same, or succeed by doing it in another way? Using "

...

" in each cell works, but is so unhandy while a property is theoretically available to do the job... Thanks Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Aug 11 17:51:20 2020 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 11 Aug 2020 17:51:20 +0200 Subject: [Scilab-users] Changing the fontname for the content of a table uicontrol In-Reply-To: References: Message-ID: <435f1d72-7829-7e5c-ca56-23c481017c5b@free.fr> OK: this issue has already been reported @ http://bugzilla.scilab.org/15612 It was already the same with Scilab 5. Apparently, font* properties have not been implemented for tables. This would deserve at least to be documented.. Samuel Le 11/08/2020 ? 17:37, Samuel Gougeon a ?crit?: > > Dear all, > > I am struggling with changing the .fontname property for the content > of a table uicontrol. > The default font is "Tahoma", that is not monospaced. I would like to > set a monospaced font, > like "Monospaced", "Consolas", etc that are available on my system, > as reported by xlfont("AVAILABLE_FONTS"). > > xlfont("Consolas")? // works well: > > --> xlfont > ?ans? = > ???????? column 1 to 7 > *"Monospaced"*? "ScilabSymbols"? "Serif" "Serif Italic"? "Serif Bold"? > "Serif Bold Italic"? "SansSerif" > ???????? column 8 to 11 > ? "SansSerif Italic"? "SansSerif Bold"? "SansSerif Bold Italic"? > "SansSerif Bold Italic" > > --> xlfont("Consolas"); > --> xlfont > ?ans? = > ???????? column 1 to 7 > *"Monospaced" *"ScilabSymbols"? "Serif"? "Serif Italic"? "Serif Bold"? > "Serif Bold Italic"? "SansSerif" > ???????? column 8 to 12 > ? "SansSerif Italic"? "SansSerif Bold"? "SansSerif Bold Italic"? > "SansSerif Bold Italic" *"Consolas"* > > But the, when i set it to the uicontrol, the rendering does not change: > > xlfont() > > table = [ > "" "A" "B" "C" "D" > "1" "try" "catch" "abs" "evstr" > "2" "do" "members" "while" "sin" > "3" "cos" "isascii" "linspace" "tan" > ]; > f = gcf(); clf > as = f.axes_size; // [width height] > ut = uicontrol("style","table", "string",table,"FontName","Consolas", .. > "position", [5 as(2)-100 300 100]); // =>@top left corner of figure > // No change in the display, even after resizing a bit the figure > (sometimes required to update the display). Yet, the property has well > been assigned: --> ut.fontnameans ="Consolas" > > Does anyone experiment the same, or succeed by doing it in another way? > Using "

...

" in each cell works, > but is so unhandy while a property is theoretically available to do the job... > > Thanks > 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 ejonah at milkor.com Fri Aug 14 16:52:40 2020 From: ejonah at milkor.com (ejonah) Date: Fri, 14 Aug 2020 07:52:40 -0700 (MST) Subject: [Scilab-users] Toolbox for calling external C++ libraries Message-ID: <1597416760869-0.post@n3.nabble.com> Hi, I want to be able to import C++ functions using Scipy api. The examples in the documentation are for C or Fortran. Can anyone help me with a simply guide as to how to do this with C++? An example will be helpful. Second question: What version of modern C++ does Scilab support? Thanks NB: I am running Scilab 6.1.0 on Windows 10. -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From frank.nitsche at ams.com Mon Aug 17 09:10:47 2020 From: frank.nitsche at ams.com (Frank Nitsche) Date: Mon, 17 Aug 2020 07:10:47 +0000 Subject: [Scilab-users] Unsubscribe Message-ID: <2be102730d71464ea734acfeafaf685c@SUX5072.office.amsiag.com> Dr.-Ing. Frank Nitsche Senior Staff Engineer Chipdesign Analog [cid:image001.png at 01D67476.49158B80] ams Sensors Germany GmbH Goeschwitzer Strasse 32 07745 Jena, Germany T +49 3641 2809 78 frank.nitsche at ams.com www.ams.com Please consider the environment before printing this mail ams Sensors Germany GmbH, Goeschwitzer Strasse 32, D-07745 Jena, Germany Rechtsform: Gesellschaft mit beschraenkter Haftung Sitz der Gesellschaft: Jena Gesch?ftsf?hrer: Dr. Fred Grunert, Dr. Reiner Jumpertz, Dr. Jann H. Siefken Handelsregister: Amtsgericht Jena, HRB 209557 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 2895 bytes Desc: image001.png URL: From heinznabielek at icloud.com Wed Aug 19 00:10:23 2020 From: heinznabielek at icloud.com (Heinz Nabielek) Date: Wed, 19 Aug 2020 00:10:23 +0200 Subject: [Scilab-users] calendar does not work Message-ID: <699B05EB-0B24-46B9-98CB-5A466A035B4B@icloud.com> --> calendar ????????????Aug?2020 Mon??Tue??Wed??Thu??Fri??Sat??Sun ??????????????????????????1????2 ?3????4????5????6????7????8????9 10???11???12???13???14???15???16 17???18???19???20???21???22???23 24???25???26???27???28???29???30 31?????????????????????????????? What had happened? Scilab 6.1 under macOS Catalina 10.15.6 Heinz From antoine.monmayrant at laas.fr Wed Aug 19 12:45:11 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Wed, 19 Aug 2020 12:45:11 +0200 Subject: [Scilab-users] calendar does not work In-Reply-To: <699B05EB-0B24-46B9-98CB-5A466A035B4B@icloud.com> References: <699B05EB-0B24-46B9-98CB-5A466A035B4B@icloud.com> Message-ID: Hello, It works as expected here (6.1.0 under linux). Is this an encoding issue? It looks like all the spaces are replaced by ?s... Antoine Le 19/08/2020 ? 00:10, Heinz Nabielek a ?crit?: > --> calendar > > ????????????Aug?2020 > Mon??Tue??Wed??Thu??Fri??Sat??Sun > ??????????????????????????1????2 > ?3????4????5????6????7????8????9 > 10???11???12???13???14???15???16 > 17???18???19???20???21???22???23 > 24???25???26???27???28???29???30 > 31?????????????????????????????? > > What had happened? Scilab 6.1 under macOS Catalina 10.15.6 > > Heinz > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From antoine.monmayrant at laas.fr Wed Aug 19 12:54:18 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Wed, 19 Aug 2020 12:54:18 +0200 Subject: [Scilab-users] the linear least-squares fitting problem In-Reply-To: References: Message-ID: <099eeb6f-2527-4033-98ce-e36e7a66fe2a@laas.fr> Hello Heinz, Please see the attached tutorial? I wrote for the other physicists in my lab on how to use scilab to fit data with a model and calculate the confidence interval. The reference paper mentioned in the comments is worth reading, it helped me a lot understanding how the confidence interval relates to the covariance matrix. Hope it helps, Antoine ?I made a poor choice for the data/model to fit as sin(x) is not really nice (multiple parameters work equally well). I should have used a gaussian or lorentzian curve... Le 01/08/2020 ? 16:45, Heinz Nabielek a ?crit?: > Dear Scilabers, > > for mathematicians, the linear least-squares fitting is a trivial > problem, but as an experimental physicist I had problems finding the > right correlations for predicting the Confidence Limits of the fitted > functional relationship. For a trivial set of experimental data, I > wrote a few lines of Scilab code and have 2 questions: > > - is the computation of confidence limits correct? > > - for large data sets and higher degree polynomials, can we make the > computations more efficient and reliable? > > Thanks in advance > Heinz > _________________________ > x=[0.1269868 0.135477 0.221034 0.45 0.8350086 0.9057919 0.9133759 > 0.9688678]'; y=[0.0695843 0.0154644 0.0893982 0.5619441 1.3879476 > 1.5639274 1.6570076 1.9061488]'; > plot(x,y,'m.','markersize',14);xgrid(1,1,1); X=[ones(x) x x^2]; // > matrix of independent vectors b=X\y; // parameters of linear LSFIT > with a 2nd degree polynomial yh = X*b; //Fitted values yh to > approximate measured y's e=y-yh; //Errors or residuals SSE=e'*e; //Sum > of squared errors ybar=mean(y); R2=1-SSE/sum((y-ybar)^2); [m > n]=size(X); MSE = SSE/(m-n-1); //Mean square error se=sqrt(MSE); > C=MSE*inv(X'*X); seb=sqrt(diag(C)); CONF=.95; alpha=1-CONF; ta2 = > cdft('T',m-n,1-alpha/2,alpha/2); //t-value for alpha/2 > xx=(0.1:.025:1)'; // cover the whole abscissa range in detail > XX=[ones(xx) xx xx^2]; yhh=XX*b; // predicted extended LSFIT curve > plot(xx,yhh,'kd-','MarkerSize',8); [mm n]=size(XX); sY = []; sYp = []; > //Terms involved in Confidence Interval for Y, Ypred for i=1:mm; sY = > [sY; sqrt(XX(i,:)*C*XX(i,:)')]; // standard error in fit sYp = [sYp; > se*sqrt(1+XX(i,:)*(C/se)*XX(i,:)')]; // standard error in spread in > population distribution end; plot(xx, yhh+ta2*sYp,'rd-'); plot(xx, > yhh+ta2*sY,'bd-'); plot(xx, yhh-ta2*sY,'gd-'); plot(xx, > yhh-ta2*sYp,'md-'); title('LINEAR LEAST-SQUARES FIT WITH 95% > CONFIDENCE BOUNDS ON FIT AND ON THE POPULATION SPREAD','fontsize',2); > xlabel('x-values','fontsize',5); ylabel('y-values','fontsize',5); > legend('measurement data','LSFIT of 2nd order polynomial','upper 95% > CL population','upper 95% CL fit','lower 95% CL fit','lower 95% CL > population',2); > > > > > > > _______________________________________________ > 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: tuto_fit.sce Type: application/x-scilab-sce Size: 11713 bytes Desc: not available URL: From fmiyara at fceia.unr.edu.ar Thu Aug 20 18:18:22 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Thu, 20 Aug 2020 13:18:22 -0300 Subject: [Scilab-users] axis number style Message-ID: <2b13c61a-91e2-b4c4-6464-fa00298213a2@fceia.unr.edu.ar> Dear all, When plotting some data the axes present ticks labelled with numbers. However, the digits of the different numbers on the same axis may differ, for instance 0.8, 0.9, 1, 1.1. It would be better if the default presentation were 0.8, 0.9, 1.0, 1.1. Is there a way to set this as a default? Thanks. Regards, Federico Miyara -- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Fri Aug 21 03:58:10 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Thu, 20 Aug 2020 22:58:10 -0300 Subject: [Scilab-users] Question Message-ID: <0f927b12-14f9-d326-2e79-803686f6c0aa@fceia.unr.edu.ar> Dear all, After trying to kill a process (don't remember how, the process was a repetitve sound using sound(), now I know why) the prompt became -1-> I couldn't find out what this means and how to get back to the normal prompt (other than closing the program). Thanks. Regards, Federico Miyara -- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Fri Aug 21 09:38:03 2020 From: perrichon.pierre at wanadoo.fr (perrichon.pierre at wanadoo.fr) Date: Fri, 21 Aug 2020 09:38:03 +0200 Subject: [Scilab-users] Question In-Reply-To: <0f927b12-14f9-d326-2e79-803686f6c0aa@fceia.unr.edu.ar> References: <0f927b12-14f9-d326-2e79-803686f6c0aa@fceia.unr.edu.ar> Message-ID: <000701d6778e$038b23c0$0aa16b40$@wanadoo.fr> Hello Federico Enter ? abort ? on your keyboard Regards De : users De la part de Federico Miyara Envoy? : vendredi 21 ao?t 2020 03:58 ? : Users mailing list for Scilab Objet : [Scilab-users] Question Dear all, After trying to kill a process (don't remember how, the process was a repetitve sound using sound(), now I know why) the prompt became -1-> I couldn't find out what this means and how to get back to the normal prompt (other than closing the program). Thanks. Regards, Federico Miyara Libre de virus. www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Fri Aug 21 14:28:12 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Fri, 21 Aug 2020 14:28:12 +0200 Subject: [Scilab-users] Question In-Reply-To: <000701d6778e$038b23c0$0aa16b40$@wanadoo.fr> References: <0f927b12-14f9-d326-2e79-803686f6c0aa@fceia.unr.edu.ar> <000701d6778e$038b23c0$0aa16b40$@wanadoo.fr> Message-ID: On 21/08/2020 09:38, perrichon.pierre at wanadoo.fr wrote: > > Hello Federico > > Enter ??abort?? on your keyboard > Or "resume", depending on what you want to do and how you arrived here. Adding some "pause" inside some buggy function is the most basic way of debugging: the -1-> prompt gives access to all the local variables of your function at the "pause". You can then investigate what's wrong with them and either "abort" (forget what you where doing in the function) or "resume" (finish the execution of the function) to return to the usual prompt. Hope it helps, Antoine > Regards > > *De?:*users *De la part de* Federico > Miyara > *Envoy??:* vendredi 21 ao?t 2020 03:58 > *??:* Users mailing list for Scilab > *Objet?:* [Scilab-users] Question > > > Dear all, > > After trying to kill a process (don't remember how, the process was a > repetitve sound using sound(), now I know why) the prompt became > > -1-> > > I couldn't find out what this means and how to get back to the normal > prompt (other than closing the program). > > Thanks. > > Regards, > > Federico Miyara > > > > > > Libre de virus. www.avast.com > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From zisper at gmail.com Sat Aug 22 02:12:26 2020 From: zisper at gmail.com (zisper) Date: Fri, 21 Aug 2020 17:12:26 -0700 (MST) Subject: [Scilab-users] Difference in output from mtlb_dir function between 6.0.2 and 6.1.1 In-Reply-To: <1ceca986-d1d5-c5b4-044a-45f964ea404c@free.fr> References: <98ace136-6d67-4089-b3b6-ff2adaef5d2a@Spark> <1ceca986-d1d5-c5b4-044a-45f964ea404c@free.fr> Message-ID: <1598055146330-0.post@n3.nabble.com> Sorry for the delayed response, I moved to Big Sur and it took me a while to get 6.1 setup again. Based on your comment, this morning I've realised what actually broke in my script (difference between a list and a structure) and gone through my scripts, reworking them to use the new format - and moving the Scilab dir function rather the mtlb_dir one. The only reason I was using mtlb_dir was because I'd initially developed the scripts on Matlab and then ran them through the translator to move them to Scilab. The translated scripts worked and so I never went back through the code and reworked them to the native Scilab function. Thanks for pointing me in the right direction! Chris -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From fmiyara at fceia.unr.edu.ar Mon Aug 24 07:23:18 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Mon, 24 Aug 2020 02:23:18 -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 -- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From fla.muff at hotmail.com Mon Aug 24 10:59:28 2020 From: fla.muff at hotmail.com (FMuff) Date: Mon, 24 Aug 2020 01:59:28 -0700 (MST) Subject: [Scilab-users] Scilab - Xcos In-Reply-To: References: Message-ID: <1598259568064-0.post@n3.nabble.com> .... is there anyone who has an answer for this problem? 1.) Is it in general not possible to create masked superblocks in Scilab 6.0.0 or higher? 2.) If this is not possible, which version is recommend for Windows 10 (I tried 5.5.2, masking superblock works but this version crashes when I want "save as"... --> are there specific requiremnts which I dont know? Specific Visual Studio version which has to be installed or what ever?? I would be really glad if someone could give me some inputs (wish to have one stable running Scilab-Xcos version on my Win10/64bits! Thanks much in advance FMuff -- Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html From Clement.David at esi-group.com Mon Aug 24 15:55:09 2020 From: Clement.David at esi-group.com (=?iso-8859-1?Q?Cl=E9ment_David?=) Date: Mon, 24 Aug 2020 13:55:09 +0000 Subject: [Scilab-users] Toolbox for calling external C++ libraries In-Reply-To: <1597416760869-0.post@n3.nabble.com> References: <1597416760869-0.post@n3.nabble.com> Message-ID: Hi, Scilab 6 has an internal C++ API that you could use if you wish to be full C++, it might change from release to release and is not ABI stable. I suggest you use the C API to target a stable API/ABI even if you are developing your code in C++. Each time you wish to send data to Scilab, write them into a Scilab datatype; each time you wish to receive data, read them from a Scilab datatype. If you prefer to map C++ objects, I suggest you to use SWIG [1] to generate the Scilab C API for you for a specific subset of your code. It will be easy to write a clean C/C++ interface and the generated code is only using the Scilab C API. [1]: http://www.swig.org/ Thanks, Cl?ment > -----Original Message----- > From: users On Behalf Of ejonah > Sent: Friday, August 14, 2020 4:53 PM > To: users at lists.scilab.org > Subject: [Scilab-users] Toolbox for calling external C++ libraries > > Hi, > > I want to be able to import C++ functions using Scipy api. The examples in the > documentation are for C or Fortran. Can anyone help me with a simply guide as > to how to do this with C++? An example will be helpful. > > Second question: What version of modern C++ does Scilab support? > > Thanks > > NB: I am running Scilab 6.1.0 on Windows 10. > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives- > f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From heinznabielek at me.com Mon Aug 24 16:09:44 2020 From: heinznabielek at me.com (Heinz Nabielek) Date: Mon, 24 Aug 2020 16:09:44 +0200 Subject: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters In-Reply-To: References: <1597416760869-0.post@n3.nabble.com> Message-ID: <0C70195A-ED55-46D8-AE98-850F6F68BB6B@me.com> I have successfully fitted straight lines to my avian mortality Monte-Carlo simulation model (function of turbine size and wind speed distributions): f(x) = pi (x+p4) with p1 for 7, p2 for 6 and p3 for 5 m/s mean wind speed p1 = 0.3930457 p2 = 0.3492537 p3 = 0.2987269 p4 = 4.058154 But, sorry, I do not manage to derive the errors (uncertainties) in the parameters. I know I need the Jacobian, but have been unable to code it in Scilab. Can you help? Best greetings Heinz BTW, these bird fatalities are far too large when compared to observations: as a next modelling step, I need to introduce avoidance factors..... -------------- next part -------------- A non-text attachment was scrubbed... Name: Avian Mortality.sce Type: application/octet-stream Size: 1041 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Avian Mortality.pdf Type: application/pdf Size: 51296 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Mon Aug 24 23:08:49 2020 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 24 Aug 2020 21:08:49 +0000 Subject: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters Message-ID: Hi Heinz, For the regression errors, I am not an expert but from wikipedia or from reference below, I would risk the following code (at your peril): https://pages.mtu.edu/~fmorriso/cm3215/UncertaintySlopeInterceptOfLeastSquaresFit.pdf // Note: for degrees of freedom>=6, t-distribution ~2 N = length(MW); mx = mean(MW); SSxx = sum((MW -mx).^2); Ea = diag(2*sig/sqrt(SSxx)) // take Ea diagonals; slope 95% confidence Eb = diag(2*sig*sqrt(1/N+mx^2/SSxx)) // take Eb diagonals; intercept 95% confidence Concerning the least squares regression part, it seems the code may be written more compactly using reglin: [a,b,sig]=reglin(MW',Y') // simple least squares linear regression GG= a.*.xx' + repmat(b,size(xx')) plot(xx,GG','LineWidth',1); Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From heinznabielek at me.com Mon Aug 24 23:58:37 2020 From: heinznabielek at me.com (Heinz Nabielek) Date: Mon, 24 Aug 2020 23:58:37 +0200 Subject: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters In-Reply-To: References: Message-ID: <74B6AD80-E649-4A2A-9E18-34099AF13E4C@me.com> On 24.08.2020, at 23:08, Rafael Guerra wrote: > > Hi Heinz, > > For the regression errors, I am not an expert but from wikipedia or from reference below, I would risk the following code (at your peril): > https://pages.mtu.edu/~fmorriso/cm3215/UncertaintySlopeInterceptOfLeastSquaresFit.pdf > > // Note: for degrees of freedom>=6, t-distribution ~2 > N = length(MW); > mx = mean(MW); > SSxx = sum((MW -mx).^2); > Ea = diag(2*sig/sqrt(SSxx)) // take Ea diagonals; slope 95% confidence > Eb = diag(2*sig*sqrt(1/N+mx^2/SSxx)) // take Eb diagonals; intercept 95% confidence > > Concerning the least squares regression part, it seems the code may be written more compactly using reglin: > > [a,b,sig]=reglin(MW',Y') // simple least squares linear regression > GG= a.*.xx' + repmat(b,size(xx')) > plot(xx,GG','LineWidth',1); Here is a little misunderstanding (my fault: I had not explained it). I want all three straight lines to go simultaneously through one point at the negative x-axis. This is why I had to use a non-linear least-squares fit. Heinz -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-2.tiff Type: image/tiff Size: 51378 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Tue Aug 25 01:46:58 2020 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 24 Aug 2020 23:46:58 +0000 Subject: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters In-Reply-To: <74B6AD80-E649-4A2A-9E18-34099AF13E4C@me.com> References: <74B6AD80-E649-4A2A-9E18-34099AF13E4C@me.com> Message-ID: In that case, the code can be simplified using backslash left matrix division: // Fixed point (-4,0) solution: a = (MW+4)\Y; b = a*4; GG= a'.*.xx' + repmat(b',1,size(xx,1)); plot(xx,GG','LineWidth',1); Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From Clement.David at esi-group.com Tue Aug 25 11:27:30 2020 From: Clement.David at esi-group.com (=?iso-8859-1?Q?Cl=E9ment_David?=) Date: Tue, 25 Aug 2020 09:27:30 +0000 Subject: [Scilab-users] Scilab - Xcos In-Reply-To: <1598259568064-0.post@n3.nabble.com> References: <1598259568064-0.post@n3.nabble.com> Message-ID: Hello, There is some bugs already reported for the mask feature, for example the bug #14155 [1] looks similar to what you describe here. Feel free to register on the CC List to be notified on change. Thanks, Cl?ment > -----Original Message----- > From: users On Behalf Of FMuff > Sent: Monday, August 24, 2020 10:59 AM > To: users at lists.scilab.org > Subject: Re: [Scilab-users] Scilab - Xcos > > .... is there anyone who has an answer for this problem? > > 1.) Is it in general not possible to create masked superblocks in Scilab > 6.0.0 or higher? > 2.) If this is not possible, which version is recommend for Windows 10 (I tried > 5.5.2, masking superblock works but this version crashes when I want "save > as"... --> are there specific requiremnts which I dont know? Specific Visual Studio > version which has to be installed or what ever?? > > I would be really glad if someone could give me some inputs (wish to have one > stable running Scilab-Xcos version on my Win10/64bits! > > Thanks much in advance > FMuff > > > > -- > Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives- > f2602246.html > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From stephane.mottelet at utc.fr Tue Aug 25 13:30:11 2020 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Tue, 25 Aug 2020 13:30:11 +0200 Subject: [Scilab-users] calendar does not work In-Reply-To: <699B05EB-0B24-46B9-98CB-5A466A035B4B@icloud.com> References: <699B05EB-0B24-46B9-98CB-5A466A035B4B@icloud.com> Message-ID: <96da6c2e-ae6a-4c7f-59a1-c555a8f0241b@utc.fr> Hello, With english defaults under OSX I cannot reproduce your output : --> getenv("LANG") ?ans? = ? "en_US.UTF-8" --> calendar ?????????????Aug?2020 ?Mon??Tue??Wed??Thu??Fri??Sat??Sun ???????????????????????????1????2 ??3????4????5????6????7????8????9 ?10???11???12???13???14???15???16 ?17???18???19???20???21???22???23 ?24???25???26???27???28???29???30 ?31 S. Le 19/08/2020 ? 00:10, Heinz Nabielek a ?crit?: > --> calendar > > ????????????Aug?2020 > Mon??Tue??Wed??Thu??Fri??Sat??Sun > ??????????????????????????1????2 > ?3????4????5????6????7????8????9 > 10???11???12???13???14???15???16 > 17???18???19???20???21???22???23 > 24???25???26???27???28???29???30 > 31?????????????????????????????? > > What had happened? Scilab 6.1 under macOS Catalina 10.15.6 > > Heinz > _______________________________________________ > 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 Tue Aug 25 14:33:24 2020 From: sgougeon at free.fr (sgougeon at free.fr) Date: Tue, 25 Aug 2020 14:33:24 +0200 (CEST) Subject: [Scilab-users] =?utf-8?q?Re=C2=A0=3A__calendar_does_not_work?= In-Reply-To: <699B05EB-0B24-46B9-98CB-5A466A035B4B@icloud.com> Message-ID: <2055889724.170897450.1598358804246.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello Heinz, You are likely using a quite restricted font for the Scilab console. May be your system's one as the default. These characters are non-breakable spaces ascii(160) <=> ascii([194 160]), that are not US-ASCII but nevertheless rather standard. You can check in your Scilab preferences, in the Fonts section: With the font chooser, check "Monospaced" checkbox to list only monospaced fonts. This is mandatory to keep matrices aligned, etc. Then, the "Monospaced" or "Consolas" fonts are good choices. They should include all latin-like fonts, and many non-latin ones like cyrillic, arabic, japanese, etc. And of course the non-breakable spaces. The support of extended UTF-8 characters has been added in Scilab 6.1.0 for the Scilab Advanced console (NW) and Raw console (NWNI) modes. Documenting it with adding a "Font How-to" section to the --> help console page is on the TODO list, for all STD NW and NWNI Scilab modes ;-) Every feedback is welcome about this char(160) case, noticeably from users using non-latin fonts. ascii(160) have been substituted to ascii(32) in calendar() in order to prevent lines wrapping for the calendar block of lines. But the "risk" to have a so narrow console is quite low, and we can keep normal spaces if it looks at last preferable. Regards Samuel ----- Mail d'origine ----- De: Heinz Nabielek ?: Users mailing list for Scilab Envoy?: Wed, 19 Aug 2020 00:10:23 +0200 (CEST) Objet: [Scilab-users] calendar does not work --> calendar ????????????Aug?2020 Mon??Tue??Wed??Thu??Fri??Sat??Sun ??????????????????????????1????2 ?3????4????5????6????7????8????9 10???11???12???13???14???15???16 17???18???19???20???21???22???23 24???25???26???27???28???29???30 31?????????????????????????????? What had happened? Scilab 6.1 under macOS Catalina 10.15.6 Heinz _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From heinznabielek at me.com Tue Aug 25 16:10:25 2020 From: heinznabielek at me.com (Heinz Nabielek) Date: Tue, 25 Aug 2020 16:10:25 +0200 Subject: [Scilab-users] calendar does not work In-Reply-To: <96da6c2e-ae6a-4c7f-59a1-c555a8f0241b@utc.fr> References: <699B05EB-0B24-46B9-98CB-5A466A035B4B@icloud.com> <96da6c2e-ae6a-4c7f-59a1-c555a8f0241b@utc.fr> Message-ID: <46B4674F-E709-498C-B194-CACEF8F08E99@me.com> Ah: it is that terrible Austrian dialect that they are speaking here in Vienna.... --> getenv("LANG") ans = "en_AT.UTF-8" --> calendar ????????????Aug?2020 Mon??Tue??Wed??Thu??Fri??Sat??Sun ??????????????????????????1????2 ?3????4????5????6????7????8????9 10???11???12???13???14???15???16 17???18???19???20???21???22???23 24???25???26???27???28???29???30 31?????????????????????????????? Who do I change to en_US.UTF-8 permanently under zsh? All my attempts change it only momentarily.... Heinz > On 25.08.2020, at 13:30, St?phane Mottelet wrote: > > Hello, > > With english defaults under OSX I cannot reproduce your output : > > --> getenv("LANG") > ans = > > "en_US.UTF-8" > > --> calendar > > Aug 2020 > Mon Tue Wed Thu Fri Sat Sun > 1 2 > 3 4 5 6 7 8 9 > 10 11 12 13 14 15 16 > 17 18 19 20 21 22 23 > 24 25 26 27 28 29 30 > 31 > > S. > > Le 19/08/2020 ? 00:10, Heinz Nabielek a ?crit : >> --> calendar >> ????????????Aug?2020 >> Mon??Tue??Wed??Thu??Fri??Sat??Sun >> ??????????????????????????1????2 >> ?3????4????5????6????7????8????9 >> 10???11???12???13???14???15???16 >> 17???18???19???20???21???22???23 >> 24???25???26???27???28???29???30 >> 31?????????????????????????????? >> >> What had happened? Scilab 6.1 under macOS Catalina 10.15.6 >> >> Heinz >> _______________________________________________ >> 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 From denis.crete at thalesgroup.com Tue Aug 25 16:38:21 2020 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Tue, 25 Aug 2020 14:38:21 +0000 Subject: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters In-Reply-To: References: <74B6AD80-E649-4A2A-9E18-34099AF13E4C@me.com> Message-ID: Hello, If the fixed point has to be optimized as well, it is possible to keep a linear treatment, although the solution that I have found is tedious: First, notice that because of the fixed point and the set of xk is the same for the 3 lines, all Y coordinates are proportional, I mean - y2(xk)=P2/P1*y1(xk) - y3(xk)=P3/P1*y1(xk) It is probably easy to fit the datasets y2 and y3 as a function of y1 to find r=P2/P1 and s=P3/P1. It might even be possible to use r=sum(y2)/sum(y1) and s= sum(y3)/sum(y1)... but the exact solution of the least square method is r=sum(y2.*y1)/sum(y1.*y1), s= sum(y3.*y1)/sum(y1.*y1). Then the full dataset of the 3 functions y1, y2/r and y3/s can be adjusted to the same function p1*x+A (e.g. using reglin) However, I did not write the code, yet... There might exist a more elegant solution... I understand it is not in the focus of the initial question, but it may help anyway. Denis NB: a more compact algorithm is to fit for i=1...3, yi/sum(yi.*y1)= f(x) De : users De la part de Rafael Guerra Envoy? : mardi 25 ao?t 2020 01:47 ? : Heinz Nabielek ; Users mailing list for Scilab Objet : Re: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters In that case, the code can be simplified using backslash left matrix division: // Fixed point (-4,0) solution: a = (MW+4)\Y; b = a*4; GG= a'.*.xx' + repmat(b',1,size(xx,1)); plot(xx,GG','LineWidth',1); Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Aug 25 22:17:22 2020 From: sgougeon at free.fr (sgougeon at free.fr) Date: Tue, 25 Aug 2020 22:17:22 +0200 (CEST) Subject: [Scilab-users] =?utf-8?q?Re=C2=A0=3A_Re=3A__calendar_does_not_wor?= =?utf-8?q?k?= In-Reply-To: <46B4674F-E709-498C-B194-CACEF8F08E99@me.com> Message-ID: <454667450.172433592.1598386642490.JavaMail.root@zimbra75-e12.priv.proxad.net> >Who do I change to en_US.UTF-8 permanently under zsh? All my attempts change it only momentarily.... As suggested in my previous post, changing your defaults should not be necessary. Just using Scilab preferences, out of defaults, should fix the issue. From perrichon.pierre at wanadoo.fr Wed Aug 26 09:28:20 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Wed, 26 Aug 2020 09:28:20 +0200 Subject: [Scilab-users] Erroneous file name for the "scg" file with accented characters when using xsave instruction Message-ID: Hello, xsave don't correctly save a "scg" file with accented characters in file name See the following script or buggzilla #16537 //-------------------------------------------------------------------------- ----------------- Rep=TMPDIR chdir(Rep) Name=Rep + "\Test ??????" fd=mopen(Name + ".txt","w+") mfprintf(fd,"Fichier %s + ".txt"\n",Name) mclose(fd) num=1 f=scf(num); plot2d() f.figure_name=Name xsave(Name + ".scg",num) //Erroneous file name for the "scg" file with accented characters // W10 x64 - French AZERTY keyboard // Scilab 6.1.0 or 5.5.2 // Results : - File names : //------------------------- // Test ????????????.scg // Test ??????.txt //-------------------------------------------------------------------------- ------------------ Best regards Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Wed Aug 26 10:12:34 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Wed, 26 Aug 2020 10:12:34 +0200 Subject: [Scilab-users] Erroneous file name for the "scg" file with accented characters when using xsave instruction In-Reply-To: References: Message-ID: Hello, It seems to be Windows specific as your script works as expected under linux: ls /tmp/SCI_TMP_21007_Y24sfl/ Test ??????.scg? Test ??????.txt Could this be some encoding issues? Antoine Le 26/08/2020 ? 09:28, Perrichon a ?crit?: > Rep=TMPDIR > chdir(Rep) > Name=Rep + "\Test ??????" > fd=mopen(Name + ".txt","w+") > mfprintf(fd,"Fichier %s + ".txt"\n",Name) > mclose(fd) > num=1 > f=scf(num); > plot2d() > f.figure_name=Name > xsave(Name + ".scg",num) -------------- next part -------------- An HTML attachment was scrubbed... URL: From denis.crete at thalesgroup.com Wed Aug 26 11:57:43 2020 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Wed, 26 Aug 2020 09:57:43 +0000 Subject: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters In-Reply-To: References: <74B6AD80-E649-4A2A-9E18-34099AF13E4C@me.com> Message-ID: <72e38e199aed4bc68564e23255df3a66@thalesgroup.com> Hello, Just to finish my suggestion with this code, taking Y(2,:) as "reference": // prepare "noisy" data slope=[0.9;1;1.2];X=1:10;a=4; Y=slope*(X+a)+0.1*rand(3,10); // solve problem Z=matrix(Y'*inv(diag(Y(2,:)*Y')),-1,1); [p,q,sig]=reglin([X,X,X],Z') // compare results with a and slope q/p, p*Y(2,:)*Y' It should work as long as the same values of X are used. As it is, it assumes that datasets contain the same number of points. This restriction may be suppressed using an average value for the set of Yk taken at equal values of xk and a weight equal to the number of points averaged for this xk. And "sig" should give you some information on errors... HTH Denis De : users De la part de CRETE Denis Envoy? : mardi 25 ao?t 2020 16:38 ? : Users mailing list for Scilab ; Heinz Nabielek Objet : Re: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters Hello, If the fixed point has to be optimized as well, it is possible to keep a linear treatment, although the solution that I have found is tedious: First, notice that because of the fixed point and the set of xk is the same for the 3 lines, all Y coordinates are proportional, I mean - y2(xk)=P2/P1*y1(xk) - y3(xk)=P3/P1*y1(xk) It is probably easy to fit the datasets y2 and y3 as a function of y1 to find r=P2/P1 and s=P3/P1. It might even be possible to use r=sum(y2)/sum(y1) and s= sum(y3)/sum(y1)... but the exact solution of the least square method is r=sum(y2.*y1)/sum(y1.*y1), s= sum(y3.*y1)/sum(y1.*y1). Then the full dataset of the 3 functions y1, y2/r and y3/s can be adjusted to the same function p1*x+A (e.g. using reglin) However, I did not write the code, yet... There might exist a more elegant solution... I understand it is not in the focus of the initial question, but it may help anyway. Denis NB: a more compact algorithm is to fit for i=1...3, yi/sum(yi.*y1)= f(x) De : users > De la part de Rafael Guerra Envoy? : mardi 25 ao?t 2020 01:47 ? : Heinz Nabielek >; Users mailing list for Scilab > Objet : Re: [Scilab-users] errors (uncertainties) in non-linear least-squares fitting parameters In that case, the code can be simplified using backslash left matrix division: // Fixed point (-4,0) solution: a = (MW+4)\Y; b = a*4; GG= a'.*.xx' + repmat(b',1,size(xx,1)); plot(xx,GG','LineWidth',1); Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From fmiyara at fceia.unr.edu.ar Thu Aug 27 09:50:45 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Thu, 27 Aug 2020 04:50:45 -0300 Subject: [Scilab-users] simp_mode odesn't seem to work Message-ID: <373a591a-9da0-afc1-e7ed-998ce20ae54e@fceia.unr.edu.ar> Dear All, I need to have examples of rationals with very close poles and zeros, but the simp engine simplifies them. This is awkward, since the simp documentation says there is no threshold, so other than identical poles and zeros shouldn't be simplified. Actually this is the case with complicated rationals created from electrical network analysis of some filters, but not with the more transparent example below. My second attempt to reproduce the problem in my simple numeric example has been to use the command simp_mode to disable any simplification. But it doesn't work as expected--and described. For instance, the code N = poly([1 2 3 3.000009 5], "s") D = poly([1.0000001 3.0000003 4 6], "s") simp_mode = %f; H = N/D yields these results: --> N ?N? = ? -90.00027 +213.00055s -184.00037s? +74.000099s? -14.000009s? +s? --> D ?D? = ? 72.000014 -126.00002s +67.000005s? -14s? +s? --> H ?H? = ?? -30.000093 +31.000066s -10.00001s? +s? ?? -------------------------------------- ???????? 24.000006 -10.000001s +s? As can be seen, even if I disabled automatic simplification, the result is not the raw quotient N/D but a "simplified" version. Any idea? Is it a bug? Regards, Federico Miyara -- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.elias at scilab-enterprises.com Thu Aug 27 10:46:53 2020 From: antoine.elias at scilab-enterprises.com (antoine.elias at scilab-enterprises.com) Date: Thu, 27 Aug 2020 10:46:53 +0200 Subject: [Scilab-users] =?utf-8?q?simp=5Fmode_odesn=27t_seem_to_work?= In-Reply-To: <373a591a-9da0-afc1-e7ed-998ce20ae54e@fceia.unr.edu.ar> References: <373a591a-9da0-afc1-e7ed-998ce20ae54e@fceia.unr.edu.ar> Message-ID: Hello Federico, simp_mode is a function not a variable, use : simp_mode(%f); Regards, Antoine Le 27/08/2020 ? 09:50, Federico Miyara a ?crit : > Dear All, > > I need to have examples of rationals with very close poles and zeros, but the simp engine simplifies them. This is awkward, since the simp documentation says there is no threshold, so other than identical poles and zeros shouldn't be simplified. Actually this is the case with complicated rationals created from electrical network analysis of some filters, but not with the more transparent example below. > > My second attempt to reproduce the problem in my simple numeric example has been to use the command simp_mode to disable any simplification. But it doesn't work as expected--and described. For instance, the code > > N = poly([1 2 3 3.000009 5], "s") > D = poly([1.0000001 3.0000003 4 6], "s") > simp_mode = %f; > H = N/D > > yields these results: > > --> N > N = > -90.00027 +213.00055s -184.00037s? +74.000099s? -14.000009s? +s? > --> D > D = > 72.000014 -126.00002s +67.000005s? -14s? +s? > --> H > H = > > -30.000093 +31.000066s -10.00001s? +s? > -------------------------------------- > 24.000006 -10.000001s +s? > > As can be seen, even if I disabled automatic simplification, the result is not the raw quotient N/D but a "simplified" version. > > Any idea? Is it a bug? > > Regards, > > Federico Miyara > > [2] > Libre de virus. www.avast.com [2] > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users [1] Links: ------ [1] http://lists.scilab.org/mailman/listinfo/users [2] https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Thu Aug 27 11:41:16 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 27 Aug 2020 09:41:16 +0000 Subject: [Scilab-users] {EXT} Re: errors (uncertainties) in non-linear least-squares fitting parameters In-Reply-To: <74B6AD80-E649-4A2A-9E18-34099AF13E4C@me.com> References: <74B6AD80-E649-4A2A-9E18-34099AF13E4C@me.com> Message-ID: Hello Heinz, > De : Heinz Nabielek > Envoy? : lundi 24 ao?t 2020 23:59 > > I want all three straight lines to go simultaneously through one point at the negative x-axis. > This is why I had to use a non-linear least-squares fit. The calculation runs quite fats so it might not worth the effort of optimising it. But if ever you had more points and longer computation times, you might try to first perform a linear regression on each set of data to set the initial guess of parameters po. The non linear regression should converge faster. 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 perrichon.pierre at wanadoo.fr Thu Aug 27 12:47:50 2020 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Thu, 27 Aug 2020 12:47:50 +0200 Subject: [Scilab-users] xload doesn't work with accented letters in file names on W10 Message-ID: Hello, We get an error when loading a ? scg ? file which has accented letters in its file name Here is a script to reproduce this error //-------------------------------------------------------------------------- - Rep="TMPDIR\" chdir(Rep) NameFile1=Rep + "Test.scg"; NameFile2=Rep + "Test_xxx.scg"; NameFile3=Rep + "Test_???.scg"; f=scf(1); plot2d(); xsave(NameFile1,1) [status2, message2] = copyfile(NameFile1, NameFile2) xload(NameFile2, 10) [status3, message3] = copyfile(NameFile1, NameFile3) xload(NameFile3, 11) edit_error(%f) //-------------------------------------------------------------------------- - ERROR : --> xload(NameFile3, 11) at line 5 of function xloadFigure ( C:\Program Files\scilab-6.1.0\modules\graphics\macros\xload.sci line 101 ) at line 33 of function xload ( C:\Program Files\scilab-6.1.0\modules\graphics\macros\xload.sci line 45 ) xload: Given file is not a graphic one. --> --> edit_error(%f) ans = "Opening file C:\Program Files\scilab-6.1.0\modules\graphics\macros\xload.sci on line 101 of the source file of the function xload" Best Regards Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Thu Aug 27 13:13:23 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 27 Aug 2020 13:13:23 +0200 Subject: [Scilab-users] xload doesn't work with accented letters in file names on W10 In-Reply-To: References: Message-ID: <0da9e85a-fda7-276d-2b1e-55d84d031035@laas.fr> Hello Pierre, Exactly like last time, its seems to be Windows10-specific as your script does work as expected under Linux. Antoine From Christophe.Dang at sidel.com Thu Aug 27 16:52:21 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 27 Aug 2020 14:52:21 +0000 Subject: [Scilab-users] Weird error with leastsq() Message-ID: Hello all, Let's talk about optics. I have a glass, its refraction index n varies with the wavelength lamba. I have a CSV file with the corresponding data (verre_HOQ.cvs attached), 52 points. I want to model this with the Sellmeier model https://en.wikipedia.org/wiki/Sellmeier_equation and use for this the attached script (regression_sellmeier.sce). Mind to set the path at line 7 of the script if you want to run it. My problem: I can run piecewise regression, i.e. it runs when I work with the points 1 to 25, 13 to 39, or 32 to 52; e.g. at lines 11 and 12, it works when I use // ---------- lambda = 1e-3*donnees(1:25, 1); // en ?m nexp = donnees(1:25, 2); // ---------- but when I try to extend these ranges (and of course when I try to use all the points), it fails with the following error: 5215700pt: Wrong type for output argument #1: Real scalar expected. Can anyone tell me what goes on here? 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. -------------- next part -------------- A non-text attachment was scrubbed... Name: regression_sellmeier.sce Type: application/octet-stream Size: 1235 bytes Desc: regression_sellmeier.sce URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: verre_HOQ.csv Type: application/octet-stream Size: 678 bytes Desc: verre_HOQ.csv URL: From antoine.monmayrant at laas.fr Thu Aug 27 17:22:25 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 27 Aug 2020 17:22:25 +0200 Subject: [Scilab-users] Weird error with leastsq() In-Reply-To: References: Message-ID: <7f52a710-ff96-8006-1b56-db1a8629d6ea@laas.fr> Hello, I can tell you what happened: for some values of lambda and some values of K(4,5,6), your function is undefined and the leastsq goes kaboom! It is never a good idea to fit a function that can become undefined for some parameters/xvalues. Try to redefine the function you fit to avoid any undefined values. Antoine I was able to use the range [1:51], but not? [1:52]. Le 27/08/2020 ? 16:52, Dang Ngoc Chan, Christophe a ?crit?: > Hello all, > > Let's talk about optics. > I have a glass, its refraction index n varies with the wavelength lamba. > I have a CSV file with the corresponding data (verre_HOQ.cvs attached), 52 points. > > I want to model this with the Sellmeier model > https://en.wikipedia.org/wiki/Sellmeier_equation > and use for this the attached script (regression_sellmeier.sce). > > Mind to set the path at line 7 of the script if you want to run it. > > My problem: > I can run piecewise regression, > i.e. it runs when I work with the points 1 to 25, 13 to 39, or 32 to 52; > e.g. at lines 11 and 12, it works when I use > > // ---------- > > lambda = 1e-3*donnees(1:25, 1); // en ?m > > nexp = donnees(1:25, 2); > > // ---------- > > but when I try to extend these ranges (and of course when I try to use all the points), > it fails with the following error: > > 5215700pt: Wrong type for output argument #1: Real scalar expected. > > Can anyone tell me what goes on here? > > 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. > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Thu Aug 27 17:25:26 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 27 Aug 2020 17:25:26 +0200 Subject: [Scilab-users] Weird error with leastsq() In-Reply-To: References: Message-ID: <5d63377b-5d94-631c-4e6c-cc978d4274ff@laas.fr> OK, forget my previous answer. Use this: function [n] = sellmeier(KL, lambda) ??? K1 = KL(1); K2 = KL(2); K3 = KL(3); ??? L1 = KL(4); L2 = KL(5); L3 = KL(6); ??? lambdacarre = lambda.*lambda; ??? foo1 = lambdacarre - L1; ??? foo2 = lambdacarre - L2; ??? foo3 = lambdacarre - L3; ??? foo = 1./(foo1.*foo2.*foo3); ??? n = sqrt(1 +... ??? lambdacarre.*(K1*foo.*foo2.*foo3 + K2*foo.*foo1.*foo3 + K3*foo.*foo1.*foo2)); ??? n=real(n); endfunction Now it works. Antoine PS: Here is the issue: your sellmeier function should be bulletproof and gracefully return real values no matter what parameters you feed to it. Le 27/08/2020 ? 16:52, Dang Ngoc Chan, Christophe a ?crit?: > Hello all, > > Let's talk about optics. > I have a glass, its refraction index n varies with the wavelength lamba. > I have a CSV file with the corresponding data (verre_HOQ.cvs attached), 52 points. > > I want to model this with the Sellmeier model > https://en.wikipedia.org/wiki/Sellmeier_equation > and use for this the attached script (regression_sellmeier.sce). > > Mind to set the path at line 7 of the script if you want to run it. > > My problem: > I can run piecewise regression, > i.e. it runs when I work with the points 1 to 25, 13 to 39, or 32 to 52; > e.g. at lines 11 and 12, it works when I use > > // ---------- > > lambda = 1e-3*donnees(1:25, 1); // en ?m > > nexp = donnees(1:25, 2); > > // ---------- > > but when I try to extend these ranges (and of course when I try to use all the points), > it fails with the following error: > > 5215700pt: Wrong type for output argument #1: Real scalar expected. > > Can anyone tell me what goes on here? > > 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. > > _______________________________________________ > 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 Thu Aug 27 17:55:25 2020 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 27 Aug 2020 15:55:25 +0000 Subject: [Scilab-users] {EXT} Re: Weird error with leastsq() In-Reply-To: <5d63377b-5d94-631c-4e6c-cc978d4274ff@laas.fr> References: <5d63377b-5d94-631c-4e6c-cc978d4274ff@laas.fr> Message-ID: Hello, > De : Antoine Monmayrant > Envoy? : jeudi 27 ao?t 2020 17:25 > > n=real(n); > > Now it works. Basic. I thought about this and I know I tested some isreal(sellmeier(lambda)) stuff during the development but I did not thought it would happen during the regression process with some parameter values. Thanks a lot. 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 antoine.monmayrant at laas.fr Thu Aug 27 21:49:45 2020 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Thu, 27 Aug 2020 21:49:45 +0200 Subject: [Scilab-users] {EXT} Re: Weird error with leastsq() In-Reply-To: References: <5d63377b-5d94-631c-4e6c-cc978d4274ff@laas.fr> Message-ID: On 27/08/2020 17:55, Dang Ngoc Chan, Christophe wrote: > Hello, > >> De : Antoine Monmayrant >> Envoy? : jeudi 27 ao?t 2020 17:25 >> >> n=real(n); >> >> Now it works. > Basic. > I thought about this and I know I tested some isreal(sellmeier(lambda)) stuff during the development but I did not thought it would happen during the regression process with some parameter values. Well, been there, done that: if you think your function can only be fed cats and dogs, you can be sure that leastsq will send it giraffes and unicorns! :-) Antoine > > Thanks a lot. > > 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. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From fmiyara at fceia.unr.edu.ar Thu Aug 27 22:17:26 2020 From: fmiyara at fceia.unr.edu.ar (Federico Miyara) Date: Thu, 27 Aug 2020 17:17:26 -0300 Subject: [Scilab-users] Simplify with threshold Message-ID: <24f33def-03e3-dc45-9c3e-6ba0b98e7e3a@fceia.unr.edu.ar> Dear All, Just in case anyone finds it useful, I'm attaching a function to simplify rationals which allows, unlike the native function simp, to set a threshold below which a zero and a pole can be cancelled. Regards, Federico Miyara -- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- function [Hsimp, p, z] = simplify(H, th) // Simplify rational function when poles and zeros are // found whose values differ less than a given numerical // threshold // // Usage: // [Hsimp, p, z] = simplify(H, th) // where // H: Rational function // th: Threshold; if omitted its default value is 1e-6 // Hsimp: Version of H with coincident poles and zeros // removed // p: Poles after simplification // z: Zeros after simplification // // NOTE: The simplification is imperfect if poles and zeros // are not identical, but the rational function computed // at specific values of the variable will differ very // little if the threshold is carefully selected. The // threshold should be small, otherwise poles and zeros // which differ considerably might pe cancelled out. // // ---------------------------- // Author: Federico Miyara // Date: 2020-08-27 // Input argument error handling if argn(2)<1 | argn(2)>2 error(msprintf(gettext(.. "%s: Wrong number of input arguments: %d or %d expected.\n"),.. "simplify",1,2)); end if argn(2)<2 th = 0.000001; end if type(th)<>1 | (type(th)==1 & ~isreal(th)) error(msprintf(gettext(.. "%s: Argument #%d: Decimal number expected.\n"), .. "simplify", 2)) end if type(H)<>16 error(msprintf(gettext(.. "%s: Argument #%d: Rational fraction expected.\n"), .. "simplify", 1)) end if argn(1)>3 error(msprintf(gettext(.. "%s: Wrong number of output arguments: %d to %d expected.\n"),.. "simplify",0,3)); end // Zeros and poles of H z = roots(H.num); p = roots(H.den); // Compute the differences between all poles and all // zeros. Find the pole and zero whose difference is // minimum. If that difference is smaller than the // threshold, remove that pole anz zero. Iterate // until no pole and zero differing less than the // threshold are left. terminate = 0; while terminate==0 // Number of zeros and poles nz = length(z); np = length(p); // Initialize matrix of differences delta = zeros(np,nz); // Compute matrix of differences for k=1:nz for n=1:np delta(n,k) = abs(z(k) - p(n)); end end // Find the minimum differenc [mini, I] = min(delta); // If the minimum is smaller than the threshold // remove the corresponding pole and zero. // Otherwise, terminate the iteration. if mini Sorry, the previous version yielded a normalized version of the simplified rational. This one fixes that. Federico Miyara -- El software de antivirus Avast ha analizado este correo electr?nico en busca de virus. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- function [Hsimp, p, z] = simplify(H, th) // Simplify rational function when poles and zeros are // found whose values differ less than a given numerical // threshold // // Usage: // [Hsimp, p, z] = simplify(H, th) // where // H: Rational function // th: Threshold; if omitted its default value is 1e-6 // Hsimp: Version of H with coincident poles and zeros // removed // p: Poles after simplification // z: Zeros after simplification // // NOTE: The simplification is imperfect if poles and zeros // are not identical, but the rational function computed // at specific values of the variable will differ very // little if the threshold is carefully selected. The // threshold should be small, otherwise poles and zeros // which differ considerably might pe cancelled out. // // ---------------------------- // Author: Federico Miyara // Date: 2020-08-27 // Input argument error handling if argn(2)<1 | argn(2)>2 error(msprintf(gettext(.. "%s: Wrong number of input arguments: %d or %d expected.\n"),.. "simplify",1,2)); end if argn(2)<2 th = 0.000001; end if type(th)<>1 | (type(th)==1 & ~isreal(th)) error(msprintf(gettext(.. "%s: Argument #%d: Decimal number expected.\n"), .. "simplify", 2)) end if type(H)<>16 error(msprintf(gettext(.. "%s: Argument #%d: Rational fraction expected.\n"), .. "simplify", 1)) end if argn(1)>3 error(msprintf(gettext(.. "%s: Wrong number of output arguments: %d to %d expected.\n"),.. "simplify",0,3)); end // Zeros and poles of H z = roots(H.num); p = roots(H.den); // Compute the differences between all poles and all // zeros. Find the pole and zero whose difference is // minimum. If that difference is smaller than the // threshold, remove that pole anz zero. Iterate // until no pole and zero differing less than the // threshold are left. terminate = 0; while terminate==0 // Number of zeros and poles nz = length(z); np = length(p); // Initialize matrix of differences delta = zeros(np,nz); // Compute matrix of differences for k=1:nz for n=1:np delta(n,k) = abs(z(k) - p(n)); end end // Find the minimum differenc [mini, I] = min(delta); // If the minimum is smaller than the threshold // remove the corresponding pole and zero. // Otherwise, terminate the iteration. if mini I start SCILAB 6.1.0 under the UBUNTU 18.04 OPERATING SYSTEM from the console. This is because invoking it otherwise does not work. Each time I execute the SCILAB function genlib, the SCILAB crashes and I will have to restart it again. Any solution to this problem will be appreciated. Samuel Enibe -------------- next part -------------- An HTML attachment was scrubbed... URL: From samuel.enibe at unn.edu.ng Mon Aug 31 19:33:28 2020 From: samuel.enibe at unn.edu.ng (Samuel Enibe) Date: Mon, 31 Aug 2020 18:33:28 +0100 Subject: [Scilab-users] genlib crashes in SCILAB 6.1.0 under UBUNTU 18.04 In-Reply-To: References: Message-ID: I start SCILAB 6.1.0 under the UBUNTU 18.04 OPERATING SYSTEM from the console. This is because invoking it otherwise does not work. Each time I execute the SCILAB function genlib, the SCILAB crashes after generating the binaries for some of the user defined functions. I will have to restart the SCILAB again.to proceed. The problem does not occur when I execute the same genlib in the same way with SCILAB 5.5.2 under the same operating system. Any solution to this problem will be appreciated. Samuel Enibe On Mon, 31 Aug 2020, 17:23 Samuel Enibe, wrote: > I start SCILAB 6.1.0 under the UBUNTU 18.04 OPERATING SYSTEM from the > console. This is because invoking it otherwise does not work. > > Each time I execute the SCILAB function genlib, the SCILAB crashes and I > will have to restart it again. > > Any solution to this problem will be appreciated. > > Samuel Enibe > > -------------- next part -------------- An HTML attachment was scrubbed... URL: