From perrichon.pierre at wanadoo.fr Sat Aug 6 12:52:52 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Sat, 6 Aug 2016 12:52:52 +0200 Subject: [Scilab-users] DataTips are blocked when moving with left or right arrow on a curve Message-ID: <002701d1efd0$aeb7eb60$0c27c220$@wanadoo.fr> Hello, DataTips are blocked when moving with left or right arrow on a curve. In the above example, put a datatips on the red curve, select it at time=55s : it is not possible to go up to time 60s. with the right arrow. Other: Put a datatips on the blue curve at t=30s and select it. It is possible to go to t=15s with the left arrow. Now use the right arrow and try to return to t=30s This datatips is blocked at time t=20s See bug #14700 for attached files Sincerely Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 906 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.jpg Type: image/jpeg Size: 64458 bytes Desc: not available URL: From perrichon.pierre at wanadoo.fr Mon Aug 8 12:32:46 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Mon, 8 Aug 2016 12:32:46 +0200 Subject: [Scilab-users] Bad rendering of square root of 2 in a transfer function (XCOS). Message-ID: <008101d1f160$34d9abd0$9e8d0370$@wanadoo.fr> Hello, Bad rendering of square root of 2 in a transfer function (Latex). It makes schemas not clear, with confusion See bug #14706 for attached files Sincerely Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 906 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 8453 bytes Desc: not available URL: From sdr at durietz.se Thu Aug 11 20:26:23 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Thu, 11 Aug 2016 20:26:23 +0200 Subject: [Scilab-users] Cannot start Xcos Message-ID: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> Hello, how do I start Xcos for the first time ever? When I try from the menu: Applications - Xcos, I get this message: 8361 Tue Aug 9 21:14 ckobject(28);if with_module("xcos") then xcos(); else disp(gettext("Please install xcos module !--error 999 xcos: while executing a callback And from the command line: -->xcos !--error 999 xcos: What can I do? Regards Stefan From paul.bignier at scilab-enterprises.com Fri Aug 12 08:42:09 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Fri, 12 Aug 2016 08:42:09 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> Message-ID: <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> Hello Stefan, This error is not familiar, could you give us more information please? What version of Scilab are you using? Compiled or Binary? OS? Do you have toolboxes installed? Thanks, Paul On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: > Hello, > how do I start Xcos for the first time ever? > > When I try from the menu: Applications - Xcos, > I get this message: > > 8361 Tue Aug 9 21:14 > ckobject(28);if with_module("xcos") then xcos(); else > disp(gettext("Please install xcos module > !--error 999 > xcos: > while executing a callback > > > And from the command line: > > -->xcos > !--error 999 > xcos: > > > What can I do? > > Regards > Stefan > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com From sdr at durietz.se Fri Aug 12 10:45:19 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 12 Aug 2016 10:45:19 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> Message-ID: <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> Hello Paul, I am using Scilab 5.5.2, installed from binaries in three different computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux 14.4, respectively. I have these toolboxes installed(?): -->s = atomsSearch("toolbox"); -->mprintf("%s\n", s(:, 1)) ampl_toolbox ANN_Toolbox celestlab celestlabx CLUSTER CWA dace_scilab emd_toolbox EMTTOOL FACT Global_Optim_toolbox grocer guimaker huffcomp hypt ica_toolbox json lsitbx Mascaret MDPtoolbox metanet microdaq minphase_toolbox moc_toolbox nan OpenRTDynamics regtools rltool serial sndfile_toolbox socket_toolbox stixbox swt toolbox_skeleton toolbox_spgl1 usb_toolbox XCPL Best regards Stefan On 2016-08-12 08:42, Paul Bignier wrote: > > Hello Stefan, > > This error is not familiar, could you give us more information please? > > What version of Scilab are you using? Compiled or Binary? OS? Do you > have toolboxes installed? > > Thanks, > > Paul > > > On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >> Hello, >> how do I start Xcos for the first time ever? >> >> When I try from the menu: Applications - Xcos, >> I get this message: >> >> 8361 Tue Aug 9 21:14 >> ckobject(28);if with_module("xcos") then xcos(); else >> disp(gettext("Please install xcos module >> !--error 999 >> xcos: >> while executing a callback >> >> >> And from the command line: >> >> -->xcos >> !--error 999 >> xcos: >> >> >> What can I do? >> >> Regards >> Stefan >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > From paul.bignier at scilab-enterprises.com Fri Aug 12 11:53:25 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Fri, 12 Aug 2016 11:53:25 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> Message-ID: <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> Stefan, You are launching Xcos properly, but this number of toolboxes looks suspicious to me, one of them may be interferring. Can you please disable their autoload and try to launch Xcos? If it works, you may want to load them one by one until you can't relaunch Xcos ; that way we'll know which one is causing the trouble. Thank you, best regards, Paul On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: > Hello Paul, > > I am using Scilab 5.5.2, installed from binaries in three different > computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux 14.4, > respectively. I have these toolboxes installed(?): > > -->s = atomsSearch("toolbox"); > -->mprintf("%s\n", s(:, 1)) > ampl_toolbox > ANN_Toolbox > celestlab > celestlabx > CLUSTER > CWA > dace_scilab > emd_toolbox > EMTTOOL > FACT > Global_Optim_toolbox > grocer > guimaker > huffcomp > hypt > ica_toolbox > json > lsitbx > Mascaret > MDPtoolbox > metanet > microdaq > minphase_toolbox > moc_toolbox > nan > OpenRTDynamics > regtools > rltool > serial > sndfile_toolbox > socket_toolbox > stixbox > swt > toolbox_skeleton > toolbox_spgl1 > usb_toolbox > XCPL > > Best regards > Stefan > > > On 2016-08-12 08:42, Paul Bignier wrote: >> >> Hello Stefan, >> >> This error is not familiar, could you give us more information please? >> >> What version of Scilab are you using? Compiled or Binary? OS? Do you >> have toolboxes installed? >> >> Thanks, >> >> Paul >> >> >> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>> Hello, >>> how do I start Xcos for the first time ever? >>> >>> When I try from the menu: Applications - Xcos, >>> I get this message: >>> >>> 8361 Tue Aug 9 21:14 >>> ckobject(28);if with_module("xcos") then xcos(); else >>> disp(gettext("Please install xcos module >>> !--error 999 >>> xcos: >>> while executing a callback >>> >>> >>> And from the command line: >>> >>> -->xcos >>> !--error 999 >>> xcos: >>> >>> >>> What can I do? >>> >>> Regards >>> Stefan >>> _______________________________________________ >>> 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 -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com From sdr at durietz.se Fri Aug 12 15:06:50 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 12 Aug 2016 15:06:50 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> Message-ID: Paul, thank you very much for your help. Generally it is one's own fault when programs don't behave as expected ... So I started Scilab with all the same toolboxes but without my loadsci.sci and then I could start Xcos! But the strange thing is that if I then ran loadsci.sci from scilab's command line, -->exec(SCIHOME+"/loadsci.sci", -1) Xcos could still be started! Am I haunted by some evil ghost? Stefan On 2016-08-12 11:53, Paul Bignier wrote: > > Stefan, > > You are launching Xcos properly, but this number of toolboxes looks > suspicious to me, one of them may be interferring. > > Can you please disable their autoload and try to launch Xcos? If it > works, you may want to load them one by one until you can't relaunch > Xcos ; that way we'll know which one is causing the trouble. > > Thank you, best regards, > > Paul > > > On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >> Hello Paul, >> >> I am using Scilab 5.5.2, installed from binaries in three different >> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux >> 14.4, respectively. I have these toolboxes installed(?): >> >> -->s = atomsSearch("toolbox"); >> -->mprintf("%s\n", s(:, 1)) >> ampl_toolbox >> ANN_Toolbox >> celestlab >> celestlabx >> CLUSTER >> CWA >> dace_scilab >> emd_toolbox >> EMTTOOL >> FACT >> Global_Optim_toolbox >> grocer >> guimaker >> huffcomp >> hypt >> ica_toolbox >> json >> lsitbx >> Mascaret >> MDPtoolbox >> metanet >> microdaq >> minphase_toolbox >> moc_toolbox >> nan >> OpenRTDynamics >> regtools >> rltool >> serial >> sndfile_toolbox >> socket_toolbox >> stixbox >> swt >> toolbox_skeleton >> toolbox_spgl1 >> usb_toolbox >> XCPL >> >> Best regards >> Stefan >> >> >> On 2016-08-12 08:42, Paul Bignier wrote: >>> >>> Hello Stefan, >>> >>> This error is not familiar, could you give us more information please? >>> >>> What version of Scilab are you using? Compiled or Binary? OS? Do you >>> have toolboxes installed? >>> >>> Thanks, >>> >>> Paul >>> >>> >>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>> Hello, >>>> how do I start Xcos for the first time ever? >>>> >>>> When I try from the menu: Applications - Xcos, >>>> I get this message: >>>> >>>> 8361 Tue Aug 9 21:14 >>>> ckobject(28);if with_module("xcos") then xcos(); else >>>> disp(gettext("Please install xcos module >>>> !--error 999 >>>> xcos: >>>> while executing a callback >>>> >>>> >>>> And from the command line: >>>> >>>> -->xcos >>>> !--error 999 >>>> xcos: >>>> >>>> >>>> What can I do? >>>> >>>> Regards >>>> Stefan >>>> _______________________________________________ >>>> 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 paul.bignier at scilab-enterprises.com Fri Aug 12 15:29:19 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Fri, 12 Aug 2016 15:29:19 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> Message-ID: <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> You're welcome! I don't know what is in that loadsci.sci (sounds more like a .sce by the way) but if it is a personal file I'd start looking into it ;) Regards, Paul On 08/12/2016 03:06 PM, Stefan Du Rietz wrote: > Paul, > thank you very much for your help. Generally it is one's own fault > when programs don't behave as expected ... So I started Scilab with > all the same toolboxes but without my loadsci.sci and then I could > start Xcos! But the strange thing is that if I then ran loadsci.sci > from scilab's command line, > > -->exec(SCIHOME+"/loadsci.sci", -1) > > Xcos could still be started! > > Am I haunted by some evil ghost? > > Stefan > > > On 2016-08-12 11:53, Paul Bignier wrote: >> >> Stefan, >> >> You are launching Xcos properly, but this number of toolboxes looks >> suspicious to me, one of them may be interferring. >> >> Can you please disable their autoload and try to launch Xcos? If it >> works, you may want to load them one by one until you can't relaunch >> Xcos ; that way we'll know which one is causing the trouble. >> >> Thank you, best regards, >> >> Paul >> >> >> On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >>> Hello Paul, >>> >>> I am using Scilab 5.5.2, installed from binaries in three different >>> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux >>> 14.4, respectively. I have these toolboxes installed(?): >>> >>> -->s = atomsSearch("toolbox"); >>> -->mprintf("%s\n", s(:, 1)) >>> ampl_toolbox >>> ANN_Toolbox >>> celestlab >>> celestlabx >>> CLUSTER >>> CWA >>> dace_scilab >>> emd_toolbox >>> EMTTOOL >>> FACT >>> Global_Optim_toolbox >>> grocer >>> guimaker >>> huffcomp >>> hypt >>> ica_toolbox >>> json >>> lsitbx >>> Mascaret >>> MDPtoolbox >>> metanet >>> microdaq >>> minphase_toolbox >>> moc_toolbox >>> nan >>> OpenRTDynamics >>> regtools >>> rltool >>> serial >>> sndfile_toolbox >>> socket_toolbox >>> stixbox >>> swt >>> toolbox_skeleton >>> toolbox_spgl1 >>> usb_toolbox >>> XCPL >>> >>> Best regards >>> Stefan >>> >>> >>> On 2016-08-12 08:42, Paul Bignier wrote: >>>> >>>> Hello Stefan, >>>> >>>> This error is not familiar, could you give us more information please? >>>> >>>> What version of Scilab are you using? Compiled or Binary? OS? Do you >>>> have toolboxes installed? >>>> >>>> Thanks, >>>> >>>> Paul >>>> >>>> >>>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>>> Hello, >>>>> how do I start Xcos for the first time ever? >>>>> >>>>> When I try from the menu: Applications - Xcos, >>>>> I get this message: >>>>> >>>>> 8361 Tue Aug 9 21:14 >>>>> ckobject(28);if with_module("xcos") then xcos(); else >>>>> disp(gettext("Please install xcos module >>>>> !--error 999 >>>>> xcos: >>>>> while executing a callback >>>>> >>>>> >>>>> And from the command line: >>>>> >>>>> -->xcos >>>>> !--error 999 >>>>> xcos: >>>>> >>>>> >>>>> What can I do? >>>>> >>>>> Regards >>>>> Stefan >>>>> _______________________________________________ >>>>> 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 -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com From sdr at durietz.se Fri Aug 12 16:23:40 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Fri, 12 Aug 2016 16:23:40 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> Message-ID: <4d0de58f-b6ec-551a-1836-9295e67e282b@durietz.se> But why can I launch Xcos after running my loadsci.sce(!) if I have launched it before? Does it remember something from the first launch that makes it tolerant during the second launch to what I have done in loadsci.sce? Can you give me a hint? Regards Stefan On 2016-08-12 15:29, Paul Bignier wrote: > > You're welcome! > > I don't know what is in that loadsci.sci (sounds more like a .sce by > the way) but if it is a personal file I'd start looking into it ;) > > Regards, > > Paul > > > On 08/12/2016 03:06 PM, Stefan Du Rietz wrote: >> Paul, >> thank you very much for your help. Generally it is one's own fault >> when programs don't behave as expected ... So I started Scilab with >> all the same toolboxes but without my loadsci.sci and then I could >> start Xcos! But the strange thing is that if I then ran loadsci.sci >> from scilab's command line, >> >> -->exec(SCIHOME+"/loadsci.sci", -1) >> >> Xcos could still be started! >> >> Am I haunted by some evil ghost? >> >> Stefan >> >> >> On 2016-08-12 11:53, Paul Bignier wrote: >>> >>> Stefan, >>> >>> You are launching Xcos properly, but this number of toolboxes looks >>> suspicious to me, one of them may be interferring. >>> >>> Can you please disable their autoload and try to launch Xcos? If it >>> works, you may want to load them one by one until you can't relaunch >>> Xcos ; that way we'll know which one is causing the trouble. >>> >>> Thank you, best regards, >>> >>> Paul >>> >>> >>> On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >>>> Hello Paul, >>>> >>>> I am using Scilab 5.5.2, installed from binaries in three different >>>> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux >>>> 14.4, respectively. I have these toolboxes installed(?): >>>> >>>> -->s = atomsSearch("toolbox"); >>>> -->mprintf("%s\n", s(:, 1)) >>>> ampl_toolbox >>>> ANN_Toolbox >>>> celestlab >>>> celestlabx >>>> CLUSTER >>>> CWA >>>> dace_scilab >>>> emd_toolbox >>>> EMTTOOL >>>> FACT >>>> Global_Optim_toolbox >>>> grocer >>>> guimaker >>>> huffcomp >>>> hypt >>>> ica_toolbox >>>> json >>>> lsitbx >>>> Mascaret >>>> MDPtoolbox >>>> metanet >>>> microdaq >>>> minphase_toolbox >>>> moc_toolbox >>>> nan >>>> OpenRTDynamics >>>> regtools >>>> rltool >>>> serial >>>> sndfile_toolbox >>>> socket_toolbox >>>> stixbox >>>> swt >>>> toolbox_skeleton >>>> toolbox_spgl1 >>>> usb_toolbox >>>> XCPL >>>> >>>> Best regards >>>> Stefan >>>> >>>> >>>> On 2016-08-12 08:42, Paul Bignier wrote: >>>>> >>>>> Hello Stefan, >>>>> >>>>> This error is not familiar, could you give us more information >>>>> please? >>>>> >>>>> What version of Scilab are you using? Compiled or Binary? OS? Do you >>>>> have toolboxes installed? >>>>> >>>>> Thanks, >>>>> >>>>> Paul >>>>> >>>>> >>>>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>>>> Hello, >>>>>> how do I start Xcos for the first time ever? >>>>>> >>>>>> When I try from the menu: Applications - Xcos, >>>>>> I get this message: >>>>>> >>>>>> 8361 Tue Aug 9 21:14 >>>>>> ckobject(28);if with_module("xcos") then xcos(); else >>>>>> disp(gettext("Please install xcos module >>>>>> !--error 999 >>>>>> xcos: >>>>>> while executing a callback >>>>>> >>>>>> >>>>>> And from the command line: >>>>>> >>>>>> -->xcos >>>>>> !--error 999 >>>>>> xcos: >>>>>> >>>>>> >>>>>> What can I do? >>>>>> >>>>>> Regards >>>>>> Stefan >>>>>> _______________________________________________ >>>>>> 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 sdr at durietz.se Mon Aug 15 17:58:56 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 15 Aug 2016 17:58:56 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <4d0de58f-b6ec-551a-1836-9295e67e282b@durietz.se> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> <4d0de58f-b6ec-551a-1836-9295e67e282b@durietz.se> Message-ID: This line in my loadsci.sce is the culprit: r = input("usb2data? [n] ", "s"); The following lines don't matter. This must certainly be a bug? Regards Stefan On 2016-08-12 16:23, Stefan Du Rietz wrote: > But why can I launch Xcos after running my loadsci.sce(!) if I have > launched it before? Does it remember something from the first launch > that makes it tolerant during the second launch to what I have done in > loadsci.sce? > > Can you give me a hint? > > Regards > Stefan > > > On 2016-08-12 15:29, Paul Bignier wrote: >> >> You're welcome! >> >> I don't know what is in that loadsci.sci (sounds more like a .sce by >> the way) but if it is a personal file I'd start looking into it ;) >> >> Regards, >> >> Paul >> >> >> On 08/12/2016 03:06 PM, Stefan Du Rietz wrote: >>> Paul, >>> thank you very much for your help. Generally it is one's own fault >>> when programs don't behave as expected ... So I started Scilab with >>> all the same toolboxes but without my loadsci.sci and then I could >>> start Xcos! But the strange thing is that if I then ran loadsci.sci >>> from scilab's command line, >>> >>> -->exec(SCIHOME+"/loadsci.sci", -1) >>> >>> Xcos could still be started! >>> >>> Am I haunted by some evil ghost? >>> >>> Stefan >>> >>> >>> On 2016-08-12 11:53, Paul Bignier wrote: >>>> >>>> Stefan, >>>> >>>> You are launching Xcos properly, but this number of toolboxes looks >>>> suspicious to me, one of them may be interferring. >>>> >>>> Can you please disable their autoload and try to launch Xcos? If it >>>> works, you may want to load them one by one until you can't relaunch >>>> Xcos ; that way we'll know which one is causing the trouble. >>>> >>>> Thank you, best regards, >>>> >>>> Paul >>>> >>>> >>>> On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >>>>> Hello Paul, >>>>> >>>>> I am using Scilab 5.5.2, installed from binaries in three different >>>>> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux >>>>> 14.4, respectively. I have these toolboxes installed(?): >>>>> >>>>> -->s = atomsSearch("toolbox"); >>>>> -->mprintf("%s\n", s(:, 1)) >>>>> ampl_toolbox >>>>> ANN_Toolbox >>>>> celestlab >>>>> celestlabx >>>>> CLUSTER >>>>> CWA >>>>> dace_scilab >>>>> emd_toolbox >>>>> EMTTOOL >>>>> FACT >>>>> Global_Optim_toolbox >>>>> grocer >>>>> guimaker >>>>> huffcomp >>>>> hypt >>>>> ica_toolbox >>>>> json >>>>> lsitbx >>>>> Mascaret >>>>> MDPtoolbox >>>>> metanet >>>>> microdaq >>>>> minphase_toolbox >>>>> moc_toolbox >>>>> nan >>>>> OpenRTDynamics >>>>> regtools >>>>> rltool >>>>> serial >>>>> sndfile_toolbox >>>>> socket_toolbox >>>>> stixbox >>>>> swt >>>>> toolbox_skeleton >>>>> toolbox_spgl1 >>>>> usb_toolbox >>>>> XCPL >>>>> >>>>> Best regards >>>>> Stefan >>>>> >>>>> >>>>> On 2016-08-12 08:42, Paul Bignier wrote: >>>>>> >>>>>> Hello Stefan, >>>>>> >>>>>> This error is not familiar, could you give us more information >>>>>> please? >>>>>> >>>>>> What version of Scilab are you using? Compiled or Binary? OS? Do >>>>>> you >>>>>> have toolboxes installed? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Paul >>>>>> >>>>>> >>>>>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>>>>> Hello, >>>>>>> how do I start Xcos for the first time ever? >>>>>>> >>>>>>> When I try from the menu: Applications - Xcos, >>>>>>> I get this message: >>>>>>> >>>>>>> 8361 Tue Aug 9 21:14 >>>>>>> ckobject(28);if with_module("xcos") then xcos(); else >>>>>>> disp(gettext("Please install xcos module >>>>>>> !--error 999 >>>>>>> xcos: >>>>>>> while executing a callback >>>>>>> >>>>>>> >>>>>>> And from the command line: >>>>>>> >>>>>>> -->xcos >>>>>>> !--error 999 >>>>>>> xcos: >>>>>>> >>>>>>> >>>>>>> What can I do? >>>>>>> >>>>>>> Regards >>>>>>> Stefan >>>>>>> _______________________________________________ >>>>>>> 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 sdr at durietz.se Mon Aug 15 20:04:31 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Mon, 15 Aug 2016 20:04:31 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> <4d0de58f-b6ec-551a-1836-9295e67e282b@durietz.se> Message-ID: 1. Launch Scilab 2. Do this -->input("Press Return!", "s") -->xcos() Regards Stefan On 2016-08-15 17:58, Stefan Du Rietz wrote: > This line in my loadsci.sce is the culprit: > > r = input("usb2data? [n] ", "s"); > > The following lines don't matter. This must certainly be a bug? > > Regards > Stefan > > > On 2016-08-12 16:23, Stefan Du Rietz wrote: >> But why can I launch Xcos after running my loadsci.sce(!) if I have >> launched it before? Does it remember something from the first launch >> that makes it tolerant during the second launch to what I have done in >> loadsci.sce? >> >> Can you give me a hint? >> >> Regards >> Stefan >> >> >> On 2016-08-12 15:29, Paul Bignier wrote: >>> >>> You're welcome! >>> >>> I don't know what is in that loadsci.sci (sounds more like a .sce by >>> the way) but if it is a personal file I'd start looking into it ;) >>> >>> Regards, >>> >>> Paul >>> >>> >>> On 08/12/2016 03:06 PM, Stefan Du Rietz wrote: >>>> Paul, >>>> thank you very much for your help. Generally it is one's own fault >>>> when programs don't behave as expected ... So I started Scilab with >>>> all the same toolboxes but without my loadsci.sci and then I could >>>> start Xcos! But the strange thing is that if I then ran loadsci.sci >>>> from scilab's command line, >>>> >>>> -->exec(SCIHOME+"/loadsci.sci", -1) >>>> >>>> Xcos could still be started! >>>> >>>> Am I haunted by some evil ghost? >>>> >>>> Stefan >>>> >>>> >>>> On 2016-08-12 11:53, Paul Bignier wrote: >>>>> >>>>> Stefan, >>>>> >>>>> You are launching Xcos properly, but this number of toolboxes looks >>>>> suspicious to me, one of them may be interferring. >>>>> >>>>> Can you please disable their autoload and try to launch Xcos? If it >>>>> works, you may want to load them one by one until you can't relaunch >>>>> Xcos ; that way we'll know which one is causing the trouble. >>>>> >>>>> Thank you, best regards, >>>>> >>>>> Paul >>>>> >>>>> >>>>> On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >>>>>> Hello Paul, >>>>>> >>>>>> I am using Scilab 5.5.2, installed from binaries in three different >>>>>> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux >>>>>> 14.4, respectively. I have these toolboxes installed(?): >>>>>> >>>>>> -->s = atomsSearch("toolbox"); >>>>>> -->mprintf("%s\n", s(:, 1)) >>>>>> ampl_toolbox >>>>>> ANN_Toolbox >>>>>> celestlab >>>>>> celestlabx >>>>>> CLUSTER >>>>>> CWA >>>>>> dace_scilab >>>>>> emd_toolbox >>>>>> EMTTOOL >>>>>> FACT >>>>>> Global_Optim_toolbox >>>>>> grocer >>>>>> guimaker >>>>>> huffcomp >>>>>> hypt >>>>>> ica_toolbox >>>>>> json >>>>>> lsitbx >>>>>> Mascaret >>>>>> MDPtoolbox >>>>>> metanet >>>>>> microdaq >>>>>> minphase_toolbox >>>>>> moc_toolbox >>>>>> nan >>>>>> OpenRTDynamics >>>>>> regtools >>>>>> rltool >>>>>> serial >>>>>> sndfile_toolbox >>>>>> socket_toolbox >>>>>> stixbox >>>>>> swt >>>>>> toolbox_skeleton >>>>>> toolbox_spgl1 >>>>>> usb_toolbox >>>>>> XCPL >>>>>> >>>>>> Best regards >>>>>> Stefan >>>>>> >>>>>> >>>>>> On 2016-08-12 08:42, Paul Bignier wrote: >>>>>>> >>>>>>> Hello Stefan, >>>>>>> >>>>>>> This error is not familiar, could you give us more information >>>>>>> please? >>>>>>> >>>>>>> What version of Scilab are you using? Compiled or Binary? OS? Do >>>>>>> you >>>>>>> have toolboxes installed? >>>>>>> >>>>>>> Thanks, >>>>>>> >>>>>>> Paul >>>>>>> >>>>>>> >>>>>>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>>>>>> Hello, >>>>>>>> how do I start Xcos for the first time ever? >>>>>>>> >>>>>>>> When I try from the menu: Applications - Xcos, >>>>>>>> I get this message: >>>>>>>> >>>>>>>> 8361 Tue Aug 9 21:14 >>>>>>>> ckobject(28);if with_module("xcos") then xcos(); else >>>>>>>> disp(gettext("Please install xcos module >>>>>>>> !--error 999 >>>>>>>> xcos: >>>>>>>> while executing a callback >>>>>>>> >>>>>>>> >>>>>>>> And from the command line: >>>>>>>> >>>>>>>> -->xcos >>>>>>>> !--error 999 >>>>>>>> xcos: >>>>>>>> >>>>>>>> >>>>>>>> What can I do? >>>>>>>> >>>>>>>> Regards >>>>>>>> Stefan >>>>>>>> _______________________________________________ >>>>>>>> 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 >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From cfuttrup at gmail.com Mon Aug 15 22:13:47 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 15 Aug 2016 22:13:47 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> <4d0de58f-b6ec-551a-1836-9295e67e282b@durietz.se> Message-ID: <03780cfb-180f-6e9c-8f77-0442fe92b2d5@gmail.com> Hi Stefan An interesting find ... amazing. If you enter something (not just Return), then xcos opens. If you do not enter anything, then s contains an empty string, and xcos crashes. /Claus On 15-08-2016 20:04, Stefan Du Rietz wrote: > 1. Launch Scilab > 2. Do this > -->input("Press Return!", "s") > -->xcos() > > Regards > Stefan > > > On 2016-08-15 17:58, Stefan Du Rietz wrote: >> This line in my loadsci.sce is the culprit: >> >> r = input("usb2data? [n] ", "s"); >> >> The following lines don't matter. This must certainly be a bug? >> >> Regards >> Stefan >> >> >> On 2016-08-12 16:23, Stefan Du Rietz wrote: >>> But why can I launch Xcos after running my loadsci.sce(!) if I have >>> launched it before? Does it remember something from the first launch >>> that makes it tolerant during the second launch to what I have done in >>> loadsci.sce? >>> >>> Can you give me a hint? >>> >>> Regards >>> Stefan >>> >>> >>> On 2016-08-12 15:29, Paul Bignier wrote: >>>> >>>> You're welcome! >>>> >>>> I don't know what is in that loadsci.sci (sounds more like a .sce by >>>> the way) but if it is a personal file I'd start looking into it ;) >>>> >>>> Regards, >>>> >>>> Paul >>>> >>>> >>>> On 08/12/2016 03:06 PM, Stefan Du Rietz wrote: >>>>> Paul, >>>>> thank you very much for your help. Generally it is one's own fault >>>>> when programs don't behave as expected ... So I started Scilab with >>>>> all the same toolboxes but without my loadsci.sci and then I could >>>>> start Xcos! But the strange thing is that if I then ran loadsci.sci >>>>> from scilab's command line, >>>>> >>>>> -->exec(SCIHOME+"/loadsci.sci", -1) >>>>> >>>>> Xcos could still be started! >>>>> >>>>> Am I haunted by some evil ghost? >>>>> >>>>> Stefan >>>>> >>>>> >>>>> On 2016-08-12 11:53, Paul Bignier wrote: >>>>>> >>>>>> Stefan, >>>>>> >>>>>> You are launching Xcos properly, but this number of toolboxes looks >>>>>> suspicious to me, one of them may be interferring. >>>>>> >>>>>> Can you please disable their autoload and try to launch Xcos? If it >>>>>> works, you may want to load them one by one until you can't relaunch >>>>>> Xcos ; that way we'll know which one is causing the trouble. >>>>>> >>>>>> Thank you, best regards, >>>>>> >>>>>> Paul >>>>>> >>>>>> >>>>>> On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >>>>>>> Hello Paul, >>>>>>> >>>>>>> I am using Scilab 5.5.2, installed from binaries in three different >>>>>>> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux >>>>>>> 14.4, respectively. I have these toolboxes installed(?): >>>>>>> >>>>>>> -->s = atomsSearch("toolbox"); >>>>>>> -->mprintf("%s\n", s(:, 1)) >>>>>>> ampl_toolbox >>>>>>> ANN_Toolbox >>>>>>> celestlab >>>>>>> celestlabx >>>>>>> CLUSTER >>>>>>> CWA >>>>>>> dace_scilab >>>>>>> emd_toolbox >>>>>>> EMTTOOL >>>>>>> FACT >>>>>>> Global_Optim_toolbox >>>>>>> grocer >>>>>>> guimaker >>>>>>> huffcomp >>>>>>> hypt >>>>>>> ica_toolbox >>>>>>> json >>>>>>> lsitbx >>>>>>> Mascaret >>>>>>> MDPtoolbox >>>>>>> metanet >>>>>>> microdaq >>>>>>> minphase_toolbox >>>>>>> moc_toolbox >>>>>>> nan >>>>>>> OpenRTDynamics >>>>>>> regtools >>>>>>> rltool >>>>>>> serial >>>>>>> sndfile_toolbox >>>>>>> socket_toolbox >>>>>>> stixbox >>>>>>> swt >>>>>>> toolbox_skeleton >>>>>>> toolbox_spgl1 >>>>>>> usb_toolbox >>>>>>> XCPL >>>>>>> >>>>>>> Best regards >>>>>>> Stefan >>>>>>> >>>>>>> >>>>>>> On 2016-08-12 08:42, Paul Bignier wrote: >>>>>>>> >>>>>>>> Hello Stefan, >>>>>>>> >>>>>>>> This error is not familiar, could you give us more information >>>>>>>> please? >>>>>>>> >>>>>>>> What version of Scilab are you using? Compiled or Binary? OS? Do >>>>>>>> you >>>>>>>> have toolboxes installed? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> >>>>>>>> Paul >>>>>>>> >>>>>>>> >>>>>>>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>>>>>>> Hello, >>>>>>>>> how do I start Xcos for the first time ever? >>>>>>>>> >>>>>>>>> When I try from the menu: Applications - Xcos, >>>>>>>>> I get this message: >>>>>>>>> >>>>>>>>> 8361 Tue Aug 9 21:14 >>>>>>>>> ckobject(28);if with_module("xcos") then xcos(); else >>>>>>>>> disp(gettext("Please install xcos module >>>>>>>>> !--error 999 >>>>>>>>> xcos: >>>>>>>>> while executing a callback >>>>>>>>> >>>>>>>>> >>>>>>>>> And from the command line: >>>>>>>>> >>>>>>>>> -->xcos >>>>>>>>> !--error 999 >>>>>>>>> xcos: >>>>>>>>> >>>>>>>>> >>>>>>>>> What can I do? >>>>>>>>> >>>>>>>>> Regards >>>>>>>>> Stefan >>>>>>>>> _______________________________________________ >>>>>>>>> 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 >>> >> >> _______________________________________________ >> 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 sdr at durietz.se Tue Aug 16 00:05:14 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Tue, 16 Aug 2016 00:05:14 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <03780cfb-180f-6e9c-8f77-0442fe92b2d5@gmail.com> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> <4d0de58f-b6ec-551a-1836-9295e67e282b@durietz.se> <03780cfb-180f-6e9c-8f77-0442fe92b2d5@gmail.com> Message-ID: <822e01d1-abbe-74c6-bf0c-f7a93f59d34b@durietz.se> Thank you, Claus, for confirming. But for me there is no difference and if I just enter return, r is a space character: -->r = input("Reply! ", "s"); -->mprintf("""%s""\n", r) " " -->ascii(r) ans = 32. /Stefan On 2016-08-15 22:13, Claus Futtrup wrote: > Hi Stefan > > An interesting find ... amazing. If you enter something (not just > Return), then xcos opens. If you do not enter anything, then s > contains an empty string, and xcos crashes. > > /Claus > > On 15-08-2016 20:04, Stefan Du Rietz wrote: >> 1. Launch Scilab >> 2. Do this >> -->input("Press Return!", "s") >> -->xcos() >> >> Regards >> Stefan >> >> >> On 2016-08-15 17:58, Stefan Du Rietz wrote: >>> This line in my loadsci.sce is the culprit: >>> >>> r = input("usb2data? [n] ", "s"); >>> >>> The following lines don't matter. This must certainly be a bug? >>> >>> Regards >>> Stefan >>> >>> >>> On 2016-08-12 16:23, Stefan Du Rietz wrote: >>>> But why can I launch Xcos after running my loadsci.sce(!) if I have >>>> launched it before? Does it remember something from the first launch >>>> that makes it tolerant during the second launch to what I have >>>> done in >>>> loadsci.sce? >>>> >>>> Can you give me a hint? >>>> >>>> Regards >>>> Stefan >>>> >>>> >>>> On 2016-08-12 15:29, Paul Bignier wrote: >>>>> >>>>> You're welcome! >>>>> >>>>> I don't know what is in that loadsci.sci (sounds more like a .sce by >>>>> the way) but if it is a personal file I'd start looking into it ;) >>>>> >>>>> Regards, >>>>> >>>>> Paul >>>>> >>>>> >>>>> On 08/12/2016 03:06 PM, Stefan Du Rietz wrote: >>>>>> Paul, >>>>>> thank you very much for your help. Generally it is one's own fault >>>>>> when programs don't behave as expected ... So I started Scilab with >>>>>> all the same toolboxes but without my loadsci.sci and then I could >>>>>> start Xcos! But the strange thing is that if I then ran loadsci.sci >>>>>> from scilab's command line, >>>>>> >>>>>> -->exec(SCIHOME+"/loadsci.sci", -1) >>>>>> >>>>>> Xcos could still be started! >>>>>> >>>>>> Am I haunted by some evil ghost? >>>>>> >>>>>> Stefan >>>>>> >>>>>> >>>>>> On 2016-08-12 11:53, Paul Bignier wrote: >>>>>>> >>>>>>> Stefan, >>>>>>> >>>>>>> You are launching Xcos properly, but this number of toolboxes >>>>>>> looks >>>>>>> suspicious to me, one of them may be interferring. >>>>>>> >>>>>>> Can you please disable their autoload and try to launch Xcos? >>>>>>> If it >>>>>>> works, you may want to load them one by one until you can't >>>>>>> relaunch >>>>>>> Xcos ; that way we'll know which one is causing the trouble. >>>>>>> >>>>>>> Thank you, best regards, >>>>>>> >>>>>>> Paul >>>>>>> >>>>>>> >>>>>>> On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >>>>>>>> Hello Paul, >>>>>>>> >>>>>>>> I am using Scilab 5.5.2, installed from binaries in three >>>>>>>> different >>>>>>>> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux >>>>>>>> 14.4, respectively. I have these toolboxes installed(?): >>>>>>>> >>>>>>>> -->s = atomsSearch("toolbox"); >>>>>>>> -->mprintf("%s\n", s(:, 1)) >>>>>>>> ampl_toolbox >>>>>>>> ANN_Toolbox >>>>>>>> celestlab >>>>>>>> celestlabx >>>>>>>> CLUSTER >>>>>>>> CWA >>>>>>>> dace_scilab >>>>>>>> emd_toolbox >>>>>>>> EMTTOOL >>>>>>>> FACT >>>>>>>> Global_Optim_toolbox >>>>>>>> grocer >>>>>>>> guimaker >>>>>>>> huffcomp >>>>>>>> hypt >>>>>>>> ica_toolbox >>>>>>>> json >>>>>>>> lsitbx >>>>>>>> Mascaret >>>>>>>> MDPtoolbox >>>>>>>> metanet >>>>>>>> microdaq >>>>>>>> minphase_toolbox >>>>>>>> moc_toolbox >>>>>>>> nan >>>>>>>> OpenRTDynamics >>>>>>>> regtools >>>>>>>> rltool >>>>>>>> serial >>>>>>>> sndfile_toolbox >>>>>>>> socket_toolbox >>>>>>>> stixbox >>>>>>>> swt >>>>>>>> toolbox_skeleton >>>>>>>> toolbox_spgl1 >>>>>>>> usb_toolbox >>>>>>>> XCPL >>>>>>>> >>>>>>>> Best regards >>>>>>>> Stefan >>>>>>>> >>>>>>>> >>>>>>>> On 2016-08-12 08:42, Paul Bignier wrote: >>>>>>>>> >>>>>>>>> Hello Stefan, >>>>>>>>> >>>>>>>>> This error is not familiar, could you give us more information >>>>>>>>> please? >>>>>>>>> >>>>>>>>> What version of Scilab are you using? Compiled or Binary? OS? Do >>>>>>>>> you >>>>>>>>> have toolboxes installed? >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> >>>>>>>>> Paul >>>>>>>>> >>>>>>>>> >>>>>>>>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>>>>>>>> Hello, >>>>>>>>>> how do I start Xcos for the first time ever? >>>>>>>>>> >>>>>>>>>> When I try from the menu: Applications - Xcos, >>>>>>>>>> I get this message: >>>>>>>>>> >>>>>>>>>> 8361 Tue Aug 9 21:14 >>>>>>>>>> ckobject(28);if with_module("xcos") then xcos(); else >>>>>>>>>> disp(gettext("Please install xcos module >>>>>>>>>> !--error 999 >>>>>>>>>> xcos: >>>>>>>>>> while executing a callback >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> And from the command line: >>>>>>>>>> >>>>>>>>>> -->xcos >>>>>>>>>> !--error 999 >>>>>>>>>> xcos: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> What can I do? >>>>>>>>>> >>>>>>>>>> Regards >>>>>>>>>> Stefan >>>>>>>>>> _______________________________________________ >>>>>>>>>> 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 >>>> >>> >>> _______________________________________________ >>> 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 paul.bignier at scilab-enterprises.com Tue Aug 16 11:29:19 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Tue, 16 Aug 2016 11:29:19 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <822e01d1-abbe-74c6-bf0c-f7a93f59d34b@durietz.se> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> <4d0de58f-b6ec-551a-1836-9295e67e282b@durietz.se> <03780cfb-180f-6e9c-8f77-0442fe92b2d5@gmail.com> <822e01d1-abbe-74c6-bf0c-f7a93f59d34b@durietz.se> Message-ID: <23eb0e17-3b8f-ff5b-9c1d-e85ba2c239ec@scilab-enterprises.com> Hello Stefan & Claus, I manage to reproduce the bug in Scilab 5.5.2 but it has been fixed on the master branch (Scilab 6): Xcos doesn't crash after calls to input(). You may want to port your code to Scilab 6, or as a workaround you can use other i/o functions than input(). Regards, Paul On 08/16/2016 12:05 AM, Stefan Du Rietz wrote: > Thank you, Claus, for confirming. But for me there is no difference > and if I just enter return, r is a space character: > > -->r = input("Reply! ", "s"); > -->mprintf("""%s""\n", r) > " " > -->ascii(r) > ans = > 32. > > /Stefan > > > On 2016-08-15 22:13, Claus Futtrup wrote: >> Hi Stefan >> >> An interesting find ... amazing. If you enter something (not just >> Return), then xcos opens. If you do not enter anything, then s >> contains an empty string, and xcos crashes. >> >> /Claus >> >> On 15-08-2016 20:04, Stefan Du Rietz wrote: >>> 1. Launch Scilab >>> 2. Do this >>> -->input("Press Return!", "s") >>> -->xcos() >>> >>> Regards >>> Stefan >>> >>> >>> On 2016-08-15 17:58, Stefan Du Rietz wrote: >>>> This line in my loadsci.sce is the culprit: >>>> >>>> r = input("usb2data? [n] ", "s"); >>>> >>>> The following lines don't matter. This must certainly be a bug? >>>> >>>> Regards >>>> Stefan >>>> >>>> >>>> On 2016-08-12 16:23, Stefan Du Rietz wrote: >>>>> But why can I launch Xcos after running my loadsci.sce(!) if I have >>>>> launched it before? Does it remember something from the first launch >>>>> that makes it tolerant during the second launch to what I have >>>>> done in >>>>> loadsci.sce? >>>>> >>>>> Can you give me a hint? >>>>> >>>>> Regards >>>>> Stefan >>>>> >>>>> >>>>> On 2016-08-12 15:29, Paul Bignier wrote: >>>>>> >>>>>> You're welcome! >>>>>> >>>>>> I don't know what is in that loadsci.sci (sounds more like a .sce by >>>>>> the way) but if it is a personal file I'd start looking into it ;) >>>>>> >>>>>> Regards, >>>>>> >>>>>> Paul >>>>>> >>>>>> >>>>>> On 08/12/2016 03:06 PM, Stefan Du Rietz wrote: >>>>>>> Paul, >>>>>>> thank you very much for your help. Generally it is one's own fault >>>>>>> when programs don't behave as expected ... So I started Scilab with >>>>>>> all the same toolboxes but without my loadsci.sci and then I could >>>>>>> start Xcos! But the strange thing is that if I then ran loadsci.sci >>>>>>> from scilab's command line, >>>>>>> >>>>>>> -->exec(SCIHOME+"/loadsci.sci", -1) >>>>>>> >>>>>>> Xcos could still be started! >>>>>>> >>>>>>> Am I haunted by some evil ghost? >>>>>>> >>>>>>> Stefan >>>>>>> >>>>>>> >>>>>>> On 2016-08-12 11:53, Paul Bignier wrote: >>>>>>>> >>>>>>>> Stefan, >>>>>>>> >>>>>>>> You are launching Xcos properly, but this number of toolboxes >>>>>>>> looks >>>>>>>> suspicious to me, one of them may be interferring. >>>>>>>> >>>>>>>> Can you please disable their autoload and try to launch Xcos? >>>>>>>> If it >>>>>>>> works, you may want to load them one by one until you can't >>>>>>>> relaunch >>>>>>>> Xcos ; that way we'll know which one is causing the trouble. >>>>>>>> >>>>>>>> Thank you, best regards, >>>>>>>> >>>>>>>> Paul >>>>>>>> >>>>>>>> >>>>>>>> On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >>>>>>>>> Hello Paul, >>>>>>>>> >>>>>>>>> I am using Scilab 5.5.2, installed from binaries in three >>>>>>>>> different >>>>>>>>> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu Linux >>>>>>>>> 14.4, respectively. I have these toolboxes installed(?): >>>>>>>>> >>>>>>>>> -->s = atomsSearch("toolbox"); >>>>>>>>> -->mprintf("%s\n", s(:, 1)) >>>>>>>>> ampl_toolbox >>>>>>>>> ANN_Toolbox >>>>>>>>> celestlab >>>>>>>>> celestlabx >>>>>>>>> CLUSTER >>>>>>>>> CWA >>>>>>>>> dace_scilab >>>>>>>>> emd_toolbox >>>>>>>>> EMTTOOL >>>>>>>>> FACT >>>>>>>>> Global_Optim_toolbox >>>>>>>>> grocer >>>>>>>>> guimaker >>>>>>>>> huffcomp >>>>>>>>> hypt >>>>>>>>> ica_toolbox >>>>>>>>> json >>>>>>>>> lsitbx >>>>>>>>> Mascaret >>>>>>>>> MDPtoolbox >>>>>>>>> metanet >>>>>>>>> microdaq >>>>>>>>> minphase_toolbox >>>>>>>>> moc_toolbox >>>>>>>>> nan >>>>>>>>> OpenRTDynamics >>>>>>>>> regtools >>>>>>>>> rltool >>>>>>>>> serial >>>>>>>>> sndfile_toolbox >>>>>>>>> socket_toolbox >>>>>>>>> stixbox >>>>>>>>> swt >>>>>>>>> toolbox_skeleton >>>>>>>>> toolbox_spgl1 >>>>>>>>> usb_toolbox >>>>>>>>> XCPL >>>>>>>>> >>>>>>>>> Best regards >>>>>>>>> Stefan >>>>>>>>> >>>>>>>>> >>>>>>>>> On 2016-08-12 08:42, Paul Bignier wrote: >>>>>>>>>> >>>>>>>>>> Hello Stefan, >>>>>>>>>> >>>>>>>>>> This error is not familiar, could you give us more information >>>>>>>>>> please? >>>>>>>>>> >>>>>>>>>> What version of Scilab are you using? Compiled or Binary? OS? Do >>>>>>>>>> you >>>>>>>>>> have toolboxes installed? >>>>>>>>>> >>>>>>>>>> Thanks, >>>>>>>>>> >>>>>>>>>> Paul >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>>>>>>>>> Hello, >>>>>>>>>>> how do I start Xcos for the first time ever? >>>>>>>>>>> >>>>>>>>>>> When I try from the menu: Applications - Xcos, >>>>>>>>>>> I get this message: >>>>>>>>>>> >>>>>>>>>>> 8361 Tue Aug 9 21:14 >>>>>>>>>>> ckobject(28);if with_module("xcos") then xcos(); else >>>>>>>>>>> disp(gettext("Please install xcos module >>>>>>>>>>> !--error 999 >>>>>>>>>>> xcos: >>>>>>>>>>> while executing a callback >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> And from the command line: >>>>>>>>>>> >>>>>>>>>>> -->xcos >>>>>>>>>>> !--error 999 >>>>>>>>>>> xcos: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> What can I do? >>>>>>>>>>> >>>>>>>>>>> Regards >>>>>>>>>>> Stefan >>>>>>>>>>> _______________________________________________ >>>>>>>>>>> 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 >>>>> >>>> >>>> _______________________________________________ >>>> 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 -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Tue Aug 16 13:10:10 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Tue, 16 Aug 2016 13:10:10 +0200 Subject: [Scilab-users] help for RS232 programming Message-ID: Dear all, using the "Serial Communication Toolbox" I try to Access a Controller via a RS232 Interface. Now, since I am a very beginner in this field I could use some help. What I do: h = openserial(1," 9600,n,8,1"); If I look at "h", this is what I get: h = file15873640 I understand this is a string of a so called Serial port file...so I assume that a connection is established. --> What does this mean? --> How to Display the Content of this file? Now, once I have connetion established I want to communicate with the controllr. Example: I want to send a command with following command structure:
___? *A_r_120_0 * = for Synchronisation A = address r = command for reading 120 = Parameter for actual sensor value I try: ret = writeserial(h, " *A_r_120_0 " ); result = readsearial(h); I get: ret = 0 // seems to be OK result = ????? --> What does this mean? I use: Scilab 5.5.1 on Win 7 64bit. Thank you, Philipp -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Tue Aug 16 14:22:38 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Tue, 16 Aug 2016 14:22:38 +0200 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBoZWxwIGZvciBSUzIzMiBw?= =?utf-8?q?rogramming?= In-Reply-To: Message-ID: Hi, Here are few pointsI usually check when facing communication issues with RS232/GPIB: - Are you sure you have set the serial port correctly (delimiter, baud rate, parity, ...) ? - Are you sure your controller is supposed to answer something to this command ? - Is the syntax for passing the arguments correct (separator in particular that can be nothing, blank or even comma) ? - Do you have a command without arguments that returns a known value (like *IDN? or *SN? that should return a string with the id of the controller) ? - Did you try to connect to your controller using hyperterminal or putty to see whether the problem comes from Scilab? Hope it helps, Antoine Le Mardi, Ao?t 16, 2016 13:10 CEST, Philipp M?hlmann a ?crit: > Dear all, > > > using the "Serial Communication Toolbox" I try to Access a Controller via a > RS232 Interface. > > > > Now, since I am a very beginner in this field I could use some help. > > > What I do: > > > h = openserial(1," 9600,n,8,1"); > > > If I look at "h", this is what I get: > > h = file15873640 > > I understand this is a string of a so called Serial port file...so I assume > that a connection is established. > > > --> What does this mean? > --> How to Display the Content of this file? > > > Now, once I have connetion established I want to communicate with the > controllr. > > Example: I want to send a command with following command structure: > > > >
___? > > *A_r_120_0 > > * = for Synchronisation > A = address > r = command for reading > 120 = Parameter for actual sensor value > > I try: > > ret = writeserial(h, " *A_r_120_0 " ); > > result = readsearial(h); > > > I get: > > ret = 0 // seems to be OK > > result = ????? > > > --> What does this mean? > > > I use: > > Scilab 5.5.1 on Win 7 64bit. > > > > Thank you, > Philipp > > > > > -- > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > There we have the salad. From sdr at durietz.se Tue Aug 16 15:52:33 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Tue, 16 Aug 2016 15:52:33 +0200 Subject: [Scilab-users] Cannot start Xcos In-Reply-To: <23eb0e17-3b8f-ff5b-9c1d-e85ba2c239ec@scilab-enterprises.com> References: <51d84665-7ed0-39e5-e51f-646e2b2f3a99@durietz.se> <2d3afc9f-6df6-431a-84e9-87a4050e9391@scilab-enterprises.com> <89c1ba0e-dd80-16aa-ca6b-54e14b8b68ac@durietz.se> <8eb33eb0-e91a-eb5c-094b-afe35536f7f3@scilab-enterprises.com> <00e7f020-5e78-2f0d-c290-fe2edba8669d@scilab-enterprises.com> <4d0de58f-b6ec-551a-1836-9295e67e282b@durietz.se> <03780cfb-180f-6e9c-8f77-0442fe92b2d5@gmail.com> <822e01d1-abbe-74c6-bf0c-f7a93f59d34b@durietz.se> <23eb0e17-3b8f-ff5b-9c1d-e85ba2c239ec@scilab-enterprises.com> Message-ID: <3c50aa6d-6e2e-dfe8-9856-9d72753b269d@durietz.se> Hello Paul, x_mdialog() works fine for several inputs at once! Thanks. Regards Stefan On 2016-08-16 11:29, Paul Bignier wrote: > > Hello Stefan & Claus, > > I manage to reproduce the bug in Scilab 5.5.2 but it has been fixed on > the master branch (Scilab 6): Xcos doesn't crash after calls to input(). > > You may want to port your code to Scilab 6, or as a workaround you can > use other i/o functions > > than input(). > > Regards, > > Paul > > > On 08/16/2016 12:05 AM, Stefan Du Rietz wrote: >> Thank you, Claus, for confirming. But for me there is no difference >> and if I just enter return, r is a space character: >> >> -->r = input("Reply! ", "s"); >> -->mprintf("""%s""\n", r) >> " " >> -->ascii(r) >> ans = >> 32. >> >> /Stefan >> >> >> On 2016-08-15 22:13, Claus Futtrup wrote: >>> Hi Stefan >>> >>> An interesting find ... amazing. If you enter something (not just >>> Return), then xcos opens. If you do not enter anything, then s >>> contains an empty string, and xcos crashes. >>> >>> /Claus >>> >>> On 15-08-2016 20:04, Stefan Du Rietz wrote: >>>> 1. Launch Scilab >>>> 2. Do this >>>> -->input("Press Return!", "s") >>>> -->xcos() >>>> >>>> Regards >>>> Stefan >>>> >>>> >>>> On 2016-08-15 17:58, Stefan Du Rietz wrote: >>>>> This line in my loadsci.sce is the culprit: >>>>> >>>>> r = input("usb2data? [n] ", "s"); >>>>> >>>>> The following lines don't matter. This must certainly be a bug? >>>>> >>>>> Regards >>>>> Stefan >>>>> >>>>> >>>>> On 2016-08-12 16:23, Stefan Du Rietz wrote: >>>>>> But why can I launch Xcos after running my loadsci.sce(!) if I have >>>>>> launched it before? Does it remember something from the first >>>>>> launch >>>>>> that makes it tolerant during the second launch to what I have >>>>>> done in >>>>>> loadsci.sce? >>>>>> >>>>>> Can you give me a hint? >>>>>> >>>>>> Regards >>>>>> Stefan >>>>>> >>>>>> >>>>>> On 2016-08-12 15:29, Paul Bignier wrote: >>>>>>> >>>>>>> You're welcome! >>>>>>> >>>>>>> I don't know what is in that loadsci.sci (sounds more like a >>>>>>> .sce by >>>>>>> the way) but if it is a personal file I'd start looking into it ;) >>>>>>> >>>>>>> Regards, >>>>>>> >>>>>>> Paul >>>>>>> >>>>>>> >>>>>>> On 08/12/2016 03:06 PM, Stefan Du Rietz wrote: >>>>>>>> Paul, >>>>>>>> thank you very much for your help. Generally it is one's own >>>>>>>> fault >>>>>>>> when programs don't behave as expected ... So I started Scilab >>>>>>>> with >>>>>>>> all the same toolboxes but without my loadsci.sci and then I >>>>>>>> could >>>>>>>> start Xcos! But the strange thing is that if I then ran >>>>>>>> loadsci.sci >>>>>>>> from scilab's command line, >>>>>>>> >>>>>>>> -->exec(SCIHOME+"/loadsci.sci", -1) >>>>>>>> >>>>>>>> Xcos could still be started! >>>>>>>> >>>>>>>> Am I haunted by some evil ghost? >>>>>>>> >>>>>>>> Stefan >>>>>>>> >>>>>>>> >>>>>>>> On 2016-08-12 11:53, Paul Bignier wrote: >>>>>>>>> >>>>>>>>> Stefan, >>>>>>>>> >>>>>>>>> You are launching Xcos properly, but this number of toolboxes >>>>>>>>> looks >>>>>>>>> suspicious to me, one of them may be interferring. >>>>>>>>> >>>>>>>>> Can you please disable their autoload and try to launch Xcos? >>>>>>>>> If it >>>>>>>>> works, you may want to load them one by one until you can't >>>>>>>>> relaunch >>>>>>>>> Xcos ; that way we'll know which one is causing the trouble. >>>>>>>>> >>>>>>>>> Thank you, best regards, >>>>>>>>> >>>>>>>>> Paul >>>>>>>>> >>>>>>>>> >>>>>>>>> On 08/12/2016 10:45 AM, Stefan Du Rietz wrote: >>>>>>>>>> Hello Paul, >>>>>>>>>> >>>>>>>>>> I am using Scilab 5.5.2, installed from binaries in three >>>>>>>>>> different >>>>>>>>>> computers with Windows 7 Pro, Windows 10 Home, and Xubuntu >>>>>>>>>> Linux >>>>>>>>>> 14.4, respectively. I have these toolboxes installed(?): >>>>>>>>>> >>>>>>>>>> -->s = atomsSearch("toolbox"); >>>>>>>>>> -->mprintf("%s\n", s(:, 1)) >>>>>>>>>> ampl_toolbox >>>>>>>>>> ANN_Toolbox >>>>>>>>>> celestlab >>>>>>>>>> celestlabx >>>>>>>>>> CLUSTER >>>>>>>>>> CWA >>>>>>>>>> dace_scilab >>>>>>>>>> emd_toolbox >>>>>>>>>> EMTTOOL >>>>>>>>>> FACT >>>>>>>>>> Global_Optim_toolbox >>>>>>>>>> grocer >>>>>>>>>> guimaker >>>>>>>>>> huffcomp >>>>>>>>>> hypt >>>>>>>>>> ica_toolbox >>>>>>>>>> json >>>>>>>>>> lsitbx >>>>>>>>>> Mascaret >>>>>>>>>> MDPtoolbox >>>>>>>>>> metanet >>>>>>>>>> microdaq >>>>>>>>>> minphase_toolbox >>>>>>>>>> moc_toolbox >>>>>>>>>> nan >>>>>>>>>> OpenRTDynamics >>>>>>>>>> regtools >>>>>>>>>> rltool >>>>>>>>>> serial >>>>>>>>>> sndfile_toolbox >>>>>>>>>> socket_toolbox >>>>>>>>>> stixbox >>>>>>>>>> swt >>>>>>>>>> toolbox_skeleton >>>>>>>>>> toolbox_spgl1 >>>>>>>>>> usb_toolbox >>>>>>>>>> XCPL >>>>>>>>>> >>>>>>>>>> Best regards >>>>>>>>>> Stefan >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 2016-08-12 08:42, Paul Bignier wrote: >>>>>>>>>>> >>>>>>>>>>> Hello Stefan, >>>>>>>>>>> >>>>>>>>>>> This error is not familiar, could you give us more information >>>>>>>>>>> please? >>>>>>>>>>> >>>>>>>>>>> What version of Scilab are you using? Compiled or Binary? >>>>>>>>>>> OS? Do >>>>>>>>>>> you >>>>>>>>>>> have toolboxes installed? >>>>>>>>>>> >>>>>>>>>>> Thanks, >>>>>>>>>>> >>>>>>>>>>> Paul >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On 08/11/2016 08:26 PM, Stefan Du Rietz wrote: >>>>>>>>>>>> Hello, >>>>>>>>>>>> how do I start Xcos for the first time ever? >>>>>>>>>>>> >>>>>>>>>>>> When I try from the menu: Applications - Xcos, >>>>>>>>>>>> I get this message: >>>>>>>>>>>> >>>>>>>>>>>> 8361 Tue Aug 9 21:14 >>>>>>>>>>>> ckobject(28);if with_module("xcos") then xcos(); else >>>>>>>>>>>> disp(gettext("Please install xcos module >>>>>>>>>>>> !--error 999 >>>>>>>>>>>> xcos: >>>>>>>>>>>> while executing a callback >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> And from the command line: >>>>>>>>>>>> >>>>>>>>>>>> -->xcos >>>>>>>>>>>> !--error 999 >>>>>>>>>>>> xcos: >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> What can I do? >>>>>>>>>>>> >>>>>>>>>>>> Regards >>>>>>>>>>>> Stefan >>>>>>>>>>>> _______________________________________________ >>>>>>>>>>>> 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 >>>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 > > -- > Paul BIGNIER > Development engineer > ----------------------------------------------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles, France > Phone: +33.1.80.77.04.68 > http://www.scilab-enterprises.com > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From p.muehlmann at gmail.com Tue Aug 16 16:27:00 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Tue, 16 Aug 2016 16:27:00 +0200 Subject: [Scilab-users] ?==?utf-8?q? help for RS232 programming In-Reply-To: References: Message-ID: OK, it seems I need stopbit = 2; // at leas a working C-code has this setting so: h = openserial(1," 9600,n,8,2"); but with this, I get as a result the command back as a string when I use "readserial()" Example: h = openserial(1," 9600,n,8,2"); ret = writeserial(h, " *A_r_106_0 " ); result = readserial(h); closeserial(h); result is: A_r_106_0 as a string, but I expect it to be the Firmware Version so to your questions: - Are you sure you have set the serial port correctly (delimiter, baud rate, parity, ...) ? -> Yes - Are you sure your controller is supposed to answer something to this command ? -> Yes - Is the syntax for passing the arguments correct (separator in particular that can be nothing, blank or even comma) ? -> not 100% sure about that. -> here a link to the description of the Controller...chapter 3.12 http://www.west-l.ru/uploads/tdpdf/ca2010-cable_eng_bro.pdf - Do you have a command without arguments that returns a known value (like *IDN? or *SN? that should return a string with the id of the controller) ? -> Yes, e.g.: firmeware - Did you try to connect to your controller using hyperterminal or putty to see whether the problem comes from Scilab? -> I used the C-coded Software for testing and it can connect to the controler reading and writing values from/on it. -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Tue Aug 16 16:59:52 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Tue, 16 Aug 2016 16:59:52 +0200 Subject: [Scilab-users] ?==?utf-8?q? help for RS232 programming In-Reply-To: References: Message-ID: trying putty with following Setting: connect to COM1 baud 9600 data bits 8 stop bits 1 (or 2) parity None flow control XON / XOFF ( didn't Play with this Setting) gave only "?"-Symbols when I wanted to write in the cmd-like window now I am confused.... 2016-08-16 16:27 GMT+02:00 Philipp M?hlmann : > OK, > > it seems I need stopbit = 2; // at leas a working C-code has this setting > > > so: > > h = openserial(1," 9600,n,8,2"); > > but with this, I get as a result the command back as a string when I use > "readserial()" > > > Example: > > h = openserial(1," 9600,n,8,2"); > > ret = writeserial(h, " *A_r_106_0 " ); > > result = readserial(h); > > closeserial(h); > > > result is: A_r_106_0 as a string, but I expect it to be the Firmware > Version > > > so to your questions: > > - Are you sure you have set the serial port correctly (delimiter, baud > rate, parity, ...) ? > -> Yes > > > - Are you sure your controller is supposed to answer something to this > command ? > -> Yes > > - Is the syntax for passing the arguments correct (separator in particular > that can be nothing, blank or even comma) ? > -> not 100% sure about that. > -> here a link to the description of the Controller...chapter 3.12 > > http://www.west-l.ru/uploads/tdpdf/ca2010-cable_eng_bro.pdf > > > > - Do you have a command without arguments that returns a known value (like > *IDN? or *SN? that should return a string with the id of the controller) ? > -> Yes, e.g.: firmeware > > > - Did you try to connect to your controller using hyperterminal or putty > to see whether the problem comes from Scilab? > -> I used the C-coded Software for testing and it can connect to > the controler reading and writing values from/on it. > > > > > -- > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > There we have the salad. > -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Aug 16 17:08:45 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 16 Aug 2016 17:08:45 +0200 Subject: [Scilab-users] ?==?utf-8?q? help for RS232 programming In-Reply-To: References: Message-ID: <57B32C7D.8030202@free.fr> Hello Philipp, Thanks for the device pointer: very helpful to help you. Le 16/08/2016 16:27, Philipp M?hlmann a ?crit : > OK, > > it seems I need stopbit = 2; // at leas a working C-code has this setting > > > so: > > h = openserial(1," 9600,n,8,2"); . Beware about the leading space: ," 9600,n,8,2" or "9600,n,8,2"? > > but with this, I get as a result the command back as a string when I > use "readserial()" > > > Example: > > h = openserial(1," 9600,n,8,2"); > > ret = writeserial(h, " *A_r_106_0 " ); . Same remark: there should not be any leading and trailing space: "*A_r_106_0" Moreover: * leading "*": in the doc, it is not clear whether this char must be explicitly prepended to the actual command, or if it is always automatically prepended. Or if it must be sent apart, alone, before the actual command. You may try each method. * trailing "?": AFAIU the doc, it looks necessary to append "?" to each command. For many devices, ascii(10)==\n is used, but for this device, it looks to be "?". You may try with it. > > result = readserial(h); . Before reading, you may try inserting a sleep(..) to wait the answer before reading it. When not waiting, usually we get nothing in the output buffer. Noticeably because here the connection here is slow (9600 bauds) Try first with a quite long sleep -- say 1 second -- and when you will have the connexion and a proper answer, you will be able to decrease and tune this wait time. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Wed Aug 17 13:23:47 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Wed, 17 Aug 2016 13:23:47 +0200 Subject: [Scilab-users] ?==?utf-8?q? help for RS232 programming In-Reply-To: <57B32C7D.8030202@free.fr> References: <57B32C7D.8030202@free.fr> Message-ID: small update: 1st: thanks for all commands. 2nd: There must be two leading "*" symbols for Synchronisation. 3rd: the command (e.g. "A_r_106_0") can not be written in one single string. Instead each symbol of the command must be send separatly. example: writeserial(h,"**A"); // **A is the only part of the command that can be send in one string xpause(echotime); writeserial(h,"_"); xpause(echotime); writeserial(h,"r"); xpause(echotime); ...etc // to end the command writeserial(h,ascii(21)); xpause(echotime); buf = readserial(h); // buf contains the echo of the command a . -Symbol and the answer // e.g. A_r_106_0 .value Greetings, Philipp 2016-08-16 17:08 GMT+02:00 Samuel Gougeon : > Hello Philipp, > Thanks for the device pointer: very helpful to help you. > > Le 16/08/2016 16:27, Philipp M?hlmann a ?crit : > > OK, > > it seems I need stopbit = 2; // at leas a working C-code has this setting > > > so: > > h = openserial(1," 9600,n,8,2"); > > . > Beware about the leading space: ," 9600,n,8,2" or "9600,n,8,2"? > > > but with this, I get as a result the command back as a string when I use > "readserial()" > > > Example: > > h = openserial(1," 9600,n,8,2"); > > ret = writeserial(h, " *A_r_106_0 " ); > > . > Same remark: there should not be any leading and trailing space: > "*A_r_106_0" > Moreover: > > - leading "*": in the doc, it is not clear whether this char must be > explicitly prepended to the actual command, or if it is always > automatically prepended. Or if it must be sent apart, alone, before the > actual command. > You may try each method. > > - trailing "?": AFAIU the doc, it looks necessary to append "?" to > each command. For many devices, ascii(10)==\n is used, but for this device, > it looks to be "?". You may try with it. > > > result = readserial(h); > > . > Before reading, you may try inserting a sleep(..) to wait the answer > before reading it. When not waiting, usually we get nothing in the output > buffer. Noticeably because here the connection here is slow (9600 bauds) > Try first with a quite long sleep -- say 1 second -- and when you will > have the connexion and a proper answer, you will be able to decrease and > tune this wait time. > > HTH > Samuel > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. -------------- next part -------------- An HTML attachment was scrubbed... URL: From elsiraj at gmail.com Wed Aug 17 14:29:41 2016 From: elsiraj at gmail.com (Adeshina Sirajdin) Date: Wed, 17 Aug 2016 13:29:41 +0100 Subject: [Scilab-users] my e-mail Message-ID: elsiraj at gmail.com From gerhard.kreuzer at liftoff.at Thu Aug 18 19:40:17 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Thu, 18 Aug 2016 19:40:17 +0200 Subject: [Scilab-users] Time Series Message-ID: <05dd01d1f977$95c3b2f0$c14b18d0$@liftoff.at> Hi, what do I have: Lot of floating point data, converted from ADC samples, ?quidistant with a knowen sampling rate/sampling distance. What o I want: Plot a diagram, values over time. This sounds like a common use case. As far as I saw, I need value pairs to plot the data, but it makes no sense to generate the time data. As I have a lot of data, this causes a ?data explosion?. Is there a smarter way to do this? Is there some function where I can feed in my data-vector and define a point at the x/time-axis and than the data is plotted accordinly? With best regards Gerhard -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Aug 18 20:27:55 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 18 Aug 2016 18:27:55 +0000 Subject: [Scilab-users] Time Series In-Reply-To: <05dd01d1f977$95c3b2f0$c14b18d0$@liftoff.at> References: <05dd01d1f977$95c3b2f0$c14b18d0$@liftoff.at> Message-ID: Hi, If your data is stored in matrix s=s(i,j), with i-index along space and j-along time, with dt-sampling rate and t0 being the series starting time, then you may try something like: [Nx,Nt]=size(s); for i=1:Nx plot(t0+(0:Nt-1)*dt, s(i, : )); end If the series' start times depend on the x-axis, then you need to define a vector t0=t0(i). Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Gerhard Kreuzer Sent: Thursday, August 18, 2016 7:40 PM To: users at lists.scilab.org Subject: [Scilab-users] Time Series Hi, what do I have: Lot of floating point data, converted from ADC samples, ?quidistant with a knowen sampling rate/sampling distance. What o I want: Plot a diagram, values over time. This sounds like a common use case. As far as I saw, I need value pairs to plot the data, but it makes no sense to generate the time data. As I have a lot of data, this causes a 'data explosion'. Is there a smarter way to do this? Is there some function where I can feed in my data-vector and define a point at the x/time-axis and than the data is plotted accordinly? With best regards Gerhard -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Thu Aug 18 20:23:46 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Thu, 18 Aug 2016 11:23:46 -0700 Subject: [Scilab-users] Time Series In-Reply-To: <05dd01d1f977$95c3b2f0$c14b18d0$@liftoff.at> References: <05dd01d1f977$95c3b2f0$c14b18d0$@liftoff.at> Message-ID: <1471544626.17226.271.camel@Servo> I think you just need to generate the time data. Assuming a column vector of ADC data (or a matrix with rows of multiple samples at the sample time): plot2d((1:size(ADCdata, 2)) * sample_time, ADCdata); On Thu, 2016-08-18 at 19:40 +0200, Gerhard Kreuzer wrote: > Hi, > > > > what do I have: > > Lot of floating point data, converted from ADC samples, ?quidistant > with a knowen sampling rate/sampling distance. > > > > What o I want: > > Plot a diagram, values over time. > > > > This sounds like a common use case. > > > > As far as I saw, I need value pairs to plot the data, but it makes no > sense to generate the time data. As I have a lot of data, this causes > a ?data explosion?. > > Is there a smarter way to do this? > > > > Is there some function where I can feed in my data-vector and define a > point at the x/time-axis and than the data is plotted accordinly? > > > > With best regards > > > > Gerhard > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From gerhard.kreuzer at liftoff.at Fri Aug 19 13:26:46 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 19 Aug 2016 13:26:46 +0200 Subject: [Scilab-users] Regex problem Message-ID: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> Hi, I have a data file containing metadata and binary data. I successfully scanned the file with .net Regex class, now I want to scan it with SciLab, but .. The relevant part of the file looks like: #data# .. here comes binary data . #EOC# .. here comes binary data . #EOC# .. and so on. My regex in .net notation looks like: #data#((?(?s:.*?))#EOC#)+ Ok, in SciLab the notation is little different: '/#data#((?P(?s:.*?))#EOC#)+/' This regex expression didn't match at all. I start experimenting and it looks like that the regex engine stops at a new line character (0x0A) which i spart of the binary data block. As far as I know (and that isn't that far) the clause (?s:.*?) means, take any character until you find #EOC# but as least as possible. No interpretation on 0x0A .. Any idea how I can parse my file and get the binary data blocks into variables, or at least get pointers to the starting points, so I am able to read the binary data with some file read function? Thanks a lot for helping With best regards Gerhard -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Fri Aug 19 14:00:34 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Fri, 19 Aug 2016 14:00:34 +0200 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBSZWdleCBwcm9ibGVt?= In-Reply-To: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> Message-ID: <3384-57b6f500-23-7fcb5280@87778715> Hi Gerhard, One stupid question and one possible workaround: - 1) Are you sure that your pattern matching is supported by scilab ? Last time I tried, I had issues with capturing groups. I tried your regexpr on https://regex101.com/#pcre and it seems OK. -2) Do you really need to use regexp? Can't you just go the stupid and brute force way using mopen+mget to scan your binary file and search for #data#, start accumulating binary data and stop when you reach #EOC#, repeat until EOF? Can you provide use with a test file? Hope it helps, Antoine Le Vendredi, Ao?t 19, 2016 13:26 CEST, "Gerhard Kreuzer" a ?crit: > Hi, > > > > I have a data file containing metadata and binary data. I successfully > scanned the file with .net Regex class, now I want to scan it with SciLab, > but .. > > > > The relevant part of the file looks like: #data# .. here comes binary data > . #EOC# .. here comes binary data . #EOC# .. and so on. > > > > My regex in .net notation looks like: #data#((?(?s:.*?))#EOC#)+ > > Ok, in SciLab the notation is little different: > '/#data#((?P(?s:.*?))#EOC#)+/' > > This regex expression didn't match at all. I start experimenting and it > looks like that the regex engine stops at a new line character (0x0A) which > i spart of the binary data block. As far as I know (and that isn't that > far) the clause (?s:.*?) means, take any character until you find #EOC# but > as least as possible. > No interpretation on 0x0A .. > > Any idea how I can parse my file and get the binary data blocks into > variables, or at least get pointers to the starting points, so I am able to > read the binary data with some file read function? > > Thanks a lot for helping > > With best regards > > Gerhard > > > > > > From sgougeon at free.fr Fri Aug 19 17:20:26 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 19 Aug 2016 17:20:26 +0200 Subject: [Scilab-users] Regex problem In-Reply-To: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> Message-ID: <57B723BA.9050302@free.fr> Le 19/08/2016 13:26, Gerhard Kreuzer a ?crit : > > Hi, > > I have a data file containing metadata and binary data. I successfully > scanned the file with .net Regex class, now I want to scan it with > SciLab, but ?. > > The relevant part of the file looks like: #data# .. here comes > binary data ? #EOC# .. here comes binary data ? #EOC# .. and so on. > > My regex in .net notation looks like: #data#((?(?s:.*?))#EOC#)+ > Ok, in SciLab the notation is little different: > '/#data#((?P(?s:.*?))#EOC#)+/' > This regex expression didn?t match at all. I start experimenting and > it looks like that the regex engine stops at a new line character > (0x0A) which i spart of the binary data block. As far as I know (and > that isn?t that far) the clause (?s:.*?)means, take any character > until you find #EOC# but as least as possible. > No interpretation on 0x0A ?. > Any idea how I can parse my file and get the binary data blocks into > variables, or at least get pointers to the starting points, so I am > able to read the binary data with some file read function? Here is a working example supporting ascii(10). It looks tha "ms" modifiers must be used together: --> s = "abcd" + ascii(10) + "efghijkClmnop" + ascii(10) + "fg hiJkl" s = abcd efghijkClmnop fg hiJkl --> [trash,trash,captures] = regexp(s, "/c.*?i/*ms*i"); captures captures = !cd efghi ! ! ! !Clmnop fg hi ! So, in your case, you may try with: regexp(s, "/#data#(.*?)#EOC#)*/ms*"); May be the hardest thing will be to get your binary content as a string. I don't think that Scilab's regexp() will accept anything else than a string. May be there are some Scilab regexp features in reading binary files. To be investigated. HTH Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 19 17:59:32 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 19 Aug 2016 17:59:32 +0200 Subject: [Scilab-users] Regex problem In-Reply-To: <57B723BA.9050302@free.fr> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> Message-ID: <57B72CE4.90804@free.fr> Le 19/08/2016 17:20, Samuel Gougeon a ?crit : > Le 19/08/2016 13:26, Gerhard Kreuzer a ?crit : >> .../.... >> Any idea how I can parse my file and get the binary data blocks into >> variables, or at least get pointers to the starting points, so I am >> able to read the binary data with some file read function? > > ../... > regexp(s, "/#data#(.*?)#EOC#)*/ms*"); > > May be the hardest thing will be to get your binary content as a string. . You may try using mgetstr() and see how it behaves on a binary file, with respect to embedded ascii(10) or/and non-printable chars with ascii codes in [0:31] that will very likely be in any binary content: https://help.scilab.org/docs/6.0.0/en_US/mgetstr.html Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 19 18:04:55 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 19 Aug 2016 18:04:55 +0200 Subject: [Scilab-users] Regex problem In-Reply-To: <57B723BA.9050302@free.fr> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> Message-ID: <57B72E27.5020502@free.fr> Le 19/08/2016 17:20, Samuel Gougeon a ?crit : > Le 19/08/2016 13:26, Gerhard Kreuzer a ?crit : >> .../... >> Any idea how I can parse my file and get the binary data blocks into >> variables, or at least get pointers to the starting points, so I am >> able to read the binary data with some file read function? > > Here is a working example supporting ascii(10). It looks tha "ms" > modifiers must be used together: Aa, actually not: "s" works alone, but as a global modifier (not checked after you locally in a capturing parenthesis): --> [trash,trash,captures] = regexp(s, "/c.*?i/*s*i"); captures captures = !cd efghi ! ! ! !Clmnop fg hi ! SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Aug 19 19:14:19 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 19 Aug 2016 19:14:19 +0200 Subject: [Scilab-users] Regex problem In-Reply-To: <57B72E27.5020502@free.fr> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <57B72E27.5020502@free.fr> Message-ID: <57B73E6B.6090401@free.fr> Le 19/08/2016 18:04, Samuel Gougeon a ?crit : > Le 19/08/2016 17:20, Samuel Gougeon a ?crit : >> Le 19/08/2016 13:26, Gerhard Kreuzer a ?crit : >>> .../... >>> Any idea how I can parse my file and get the binary data blocks into >>> variables, or at least get pointers to the starting points, so I am >>> able to read the binary data with some file read function? >> >> Here is a working example supporting ascii(10). It looks tha "ms" >> modifiers must be used together: > Aa, actually not: "s" works alone, but as a global modifier (not > checked after you locally in a capturing parenthesis): . It works also locally: --> s = "abcd" + ascii(10) + "efghijkClmnop" + ascii(10) + "fg hiJkl"; --> [trash,trash,captures] = regexp(s, "/c(?*s*:.*?)i/i"); captures captures = !cd efghi ! ! ! !Clmnop fg hi ! So on your sample, it could be: // Sample string including some \n: s = "%!bk{*#data#*some binary code including \n as here" + ascii(10) .. +"etc etc*#EOC#* intersticial binary*#data#*Let''s go on with binary" + ascii(10) .. + "other bytes in 0:31 are also of concern*#EOC#* remaining binary content" // Capturing the patterns [t,t,captures] = regexp(s, "/#data#.*?#EOC#/s"); captures // Removing "#data#" and #EOC delimiters: part(captures,7:$-5) // yielding:-------------- --> // Sample string including some \n: --> s = "%!bk{#data#some binary code including \n as here" + ascii(10) .. > +"etc etc#EOC# intersticial binary#data#Let''s go on with binary" + ascii(10) .. > + "other bytes in 0:31 are also of concern#EOC# remaining binary content" s = %!bk{*#data#*some binary code including \n as here etc etc*#EOC#* intersticial binary*#data#*Let's go on with binary other bytes in 0:31 are also of concern*#EOC#* remaining binary content --> // Capturing the patterns --> [t,t,captures] = regexp(s, "/#data#.*?#EOC#/s"); captures captures = !#data#some binary code including \n as here etc etc#EOC# ! !#data#Let's go on with binary other bytes in 0:31 are also of concern#EOC# ! --> // Removing "#data#" and #EOC delimiters: --> part(captures,7:$-5) ans = !some binary code including \n as here etc etc ! !Let's go on with binary other bytes in 0:31 are also of concern ! If you have results with mgetstr() or other ways to feed regexp(), would be fine to report them :) Cheers Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerhard.kreuzer at liftoff.at Sun Aug 21 08:27:05 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Sun, 21 Aug 2016 08:27:05 +0200 Subject: [Scilab-users] plot2d problem Message-ID: <087a01d1fb75$09673840$1c35a8c0$@liftoff.at> Hi, here my two attepts one working, one failed, but why? plot2d(x, [y z]); //plot2d(x, y); // working //plot2d(x, z); // working First line fails. X, y, z were vectores 1 x 1500, so as the commented lines were working I guess that there is nothing wrong with x, y, z and their format and content, right? I checked the samples, here I found x=[0:0.1:2*%pi]'; plot2d(x,[sin(x) sin(2*x) sin(3*x)]) which is pretty much the same what I want to do, isn't it? Thanks for helping. With best regards Gerhard -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim at Wescottdesign.com Sun Aug 21 09:30:18 2016 From: Tim at Wescottdesign.com (Tim Wescott) Date: Sun, 21 Aug 2016 00:30:18 -0700 Subject: [Scilab-users] plot2d problem Message-ID: What was the error message?? Sent from my Verizon 4G LTE smartphone -------- Original message -------- From: Gerhard Kreuzer Date: 8/20/16 11:27 PM (GMT-08:00) To: users at lists.scilab.org Subject: [Scilab-users] plot2d problem Hi,?here my two attepts one working, one failed, but why??plot2d(x, [y z]);//plot2d(x, y);??????????????????? // working//plot2d(x, z);?????? ???????????? // working??First line fails. X, y, z were vectores 1 x 1500, so as the commented lines were working I guess that there is nothing wrong with x, y, z and their format and content, right?I checked the samples, here I found?x=[0:0.1:2*%pi]';plot2d(x,[sin(x) sin(2*x) sin(3*x)])?which is pretty much the same what I want to do, isn?t it??Thanks for helping.?With best regards?Gerhard??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Sun Aug 21 09:55:56 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Sun, 21 Aug 2016 09:55:56 +0200 Subject: [Scilab-users] =?utf-8?q?=3F=3D=3D=3Futf-8=3Fq=3F__plot2d_problem?= In-Reply-To: <087a01d1fb75$09673840$1c35a8c0$@liftoff.at> Message-ID: <6b45-57b95e80-7-44c47080@103300962> Hi Gerhard, Try: plot2d(x, [y ; z]); Here is my guess: in the example "plot2d(x,[sin(x) sin(2*x) sin(3*x)])", x and all the other vectors are Nx1 so "[sin(x) sin(2*x) sin(3*x)]" is Nx3 which is fine for plotting with respect to a Nx1 x vector. In your example, I think x, y and z are 1xN (not Nx1) so "[y z]" is 1x2N and not 2xN so plot2d is complaining about sizes of your arguments. Cheers, Antoine Le Dimanche, Ao?t 21, 2016 08:27 CEST, "Gerhard Kreuzer" a ?crit: > Hi, > > > > here my two attepts one working, one failed, but why? > > > > plot2d(x, [y z]); > > //plot2d(x, y); // working > > //plot2d(x, z); // working > > > > > > First line fails. X, y, z were vectores 1 x 1500, so as the commented lines > were working I guess that there is nothing wrong with x, y, z and their > format and content, right? > > I checked the samples, here I found > > > > x=[0:0.1:2*%pi]'; > > plot2d(x,[sin(x) sin(2*x) sin(3*x)]) > > > > which is pretty much the same what I want to do, isn't it? > > > > Thanks for helping. > > > > With best regards > > > > Gerhard > > > > > > > From sgougeon at free.fr Sun Aug 21 16:09:26 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 21 Aug 2016 16:09:26 +0200 Subject: [Scilab-users] plot2d problem In-Reply-To: <087a01d1fb75$09673840$1c35a8c0$@liftoff.at> References: <087a01d1fb75$09673840$1c35a8c0$@liftoff.at> Message-ID: <57B9B616.3070805@free.fr> Le 21/08/2016 08:27, Gerhard Kreuzer a ?crit : > > Hi, > > here my two attepts one working, one failed, but why? > > plot2d(x,[y z]); > . try plot2d(x,[y' z']) instead > First line fails. X, y, z were vectores 1 x 1500, so as the commented > lines were working I guess that there is nothing wrong with x, y, z > and their format and content, right? > > I checked the samples, here I found > > x=[0:0.1:2*%pi]'; > > plot2d(x,[sin (x) sin (2*x) sin (3*x)]) > > which is pretty much the same what I want to do, isn?t it? > "pretty much" is the keyword. Note the transposition of x (so of sin(n*x) ) --> uman plot2d d Description ----------- ... If x is a vector and y a matrix plot2d(x,y,) plots each *columns* of y versusvector x. https://help.scilab.org/docs/6.0.0/en_US/plot2d.html Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Aug 21 16:11:42 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 21 Aug 2016 16:11:42 +0200 Subject: [Scilab-users] Numerical precision Message-ID: Dear Scilab Users I have a script, which imitates a Fortran script. I can see there's a difference in calculation of about 1%, which is very strange to me. Input parameters (dz1 and dz2 vectors, length 1200) to the equation seem to agree within 0,1% ... so right now my theory is that the precision slips away when I do the following calculation: Scilab: zm_star = (1-mu)* dz1 .* dz2 ./ (dz2-mu*dz1); // model free mech. impedance Fortran: zm_star = (1-mu)*dz1*dz2/(dz2-mu*dz1) Do you see anything in the Scilab formulation, which should worry me / which would give me such a high error? P.S. mu is a mass-ratio = 1.9970156677443420... and it's exactly the same value in both Scilab and Fortran. Most of the calculations in the output vector are OK, but in particular around the resonance frequency, I can list the following three datapoints (zm_star(47:49)), to show what is worrying me: In Fortran, data no. 47-48-49 (near fs): ( 66.547108467527437 , -58.427426595183157 ) ( 105.67638116311093 ,-0.84432029182632362 ) ( 66.018415098214774 , 47.279402998470466 ) Whereas in Scilab I get: 67.58254632254881 - 57.549843258298814*%i 104.56362768103634 + 0.9610187273575014*%i 64.84646498264745 + 47.01680213507681*%i In particular the imaginary part is different at the middle data point (near fs) where from Fortran the value is negative, whereas in Scilab the value is positive. It seems that the calculation of zm_star involves some math operations that could be critical to the precision. If you study the impedance magnitude (pythagoras...), the results from Fortran are about 1% higher in value - IMHO that's non-negligible. Studying the Nyquist circle plot of the data, it seems to me that in general the Fortran calculation is more correct. What is going wrong with the Scilab equation? Please let me know if you have any ideas how to increase the precision of the calculation. Thanks. P.S. I'm using Scilab 5.5.0 (64 bit, Windows 10). Could it be the Intel Math Kernel that's doing this wrong? /Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sun Aug 21 18:51:56 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sun, 21 Aug 2016 18:51:56 +0200 Subject: [Scilab-users] Numerical precision In-Reply-To: References: Message-ID: Hi there OK, so I went ahead and took some Fortran input ... yes, I do get the same output as Fortran, so it seems there's no calculation error per se in Scilab. It's just tiny differences in the input which generate large differences in output. It's scary. If you compare the input (dz1 in scilab vs. dz1 in fortran, you get differences of around : 1->dz1s./dz1f ans = 0.9998331 + 0.0000339i 0.9998132 + 0.0000391i 0.9998197 + 0.0000391i And if you compare input for dz2, you get similar tiny differences : -1->dz2s./dz2f ans = 0.9999629 + 0.0000126i 0.9999600 + 0.0000145i 0.9999635 + 0.0000145i The difference in magnitude is on the scale of less than 0.02%. Here's a complete script, including comments which shows the results and explains. I only include the three datapoints around fs, which are of interest: // dz_test.sce // Scilab input/output for zm_star: dz1s = [-0.503483777422459-0.5757953650438843*%i -0.5114164682962974-0.5883274915921053*%i -0.5189524114871444-0.6013228498050527*%i] dz2s = [-0.9956247120533783-1.1585555511721832*%i -1.019729681961281-1.1864195137402458*%i -1.0436439978573127-1.2149095747738672*%i] mu = 1.997015667744342; zm_star = (1-mu)* dz1s .* dz2s ./ (dz2s-mu*dz1s); // = // 67.582546 - 57.549843i // 104.56363 + 0.9610187i // 64.846465 + 47.016802i // Fortran input: dz1f = [-0.50358736782056468-0.57587442109900699*%i -0.51153502148422891-0.58841744553307240*%i -0.51906952093260994-0.60141095056474114*%i] dz2f = [-0.99567617243878548-1.1585859673221321*%i -1.0197876382178386-1.1864521484345998*%i -1.0436997434456954-1.2149387979780446*%i] zm_star = (1-mu)* dz1f .* dz2f ./ (dz2f-mu*dz1f); // Scilab output: // = // 66.547108 - 58.427427i // 105.67638 - 0.8443203i // 66.018415 + 47.279403i // Fortran output: // ( 66.547108467527437 , -58.427426595183157 ) // ( 105.67638116311093 ,-0.84432029182632362 ) // ( 66.018415098214774 , 47.279402998470466 ) As can be seen. Scilab gives the same output as Fortran, when the input is the same. I'm just totally surprised how such small differences in input can generate such large differences in output. Best regards, Claus On 21-08-2016 16:11, Claus Futtrup wrote: > > Dear Scilab Users > > I have a script, which imitates a Fortran script. I can see there's a > difference in calculation of about 1%, which is very strange to me. > Input parameters (dz1 and dz2 vectors, length 1200) to the equation > seem to agree within 0,1% ... so right now my theory is that the > precision slips away when I do the following calculation: > > Scilab: zm_star = (1-mu)* dz1 .* dz2 ./ (dz2-mu*dz1); // model free > mech. impedance > > Fortran: zm_star = (1-mu)*dz1*dz2/(dz2-mu*dz1) > > Do you see anything in the Scilab formulation, which should worry me / > which would give me such a high error? > > P.S. mu is a mass-ratio = 1.9970156677443420... and it's exactly the > same value in both Scilab and Fortran. > > Most of the calculations in the output vector are OK, but in > particular around the resonance frequency, I can list the following > three datapoints (zm_star(47:49)), to show what is worrying me: > > In Fortran, data no. 47-48-49 (near fs): > > ( 66.547108467527437 , -58.427426595183157 ) > ( 105.67638116311093 ,-0.84432029182632362 ) > ( 66.018415098214774 , 47.279402998470466 ) > > Whereas in Scilab I get: > > 67.58254632254881 - 57.549843258298814*%i > 104.56362768103634 + 0.9610187273575014*%i > 64.84646498264745 + 47.01680213507681*%i > > In particular the imaginary part is different at the middle data point > (near fs) where from Fortran the value is negative, whereas in Scilab > the value is positive. It seems that the calculation of zm_star > involves some math operations that could be critical to the precision. > > If you study the impedance magnitude (pythagoras...), the results from > Fortran are about 1% higher in value - IMHO that's non-negligible. > > Studying the Nyquist circle plot of the data, it seems to me that in > general the Fortran calculation is more correct. > > What is going wrong with the Scilab equation? Please let me know if > you have any ideas how to increase the precision of the calculation. > Thanks. > > P.S. I'm using Scilab 5.5.0 (64 bit, Windows 10). Could it be the > Intel Math Kernel that's doing this wrong? > > /Claus > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.bignier at scilab-enterprises.com Mon Aug 22 09:06:50 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Mon, 22 Aug 2016 09:06:50 +0200 Subject: [Scilab-users] Numerical precision In-Reply-To: References: Message-ID: Hello Claus, If I get this right, after finding discrepancies between Scilab & Fortran, you identified the origin of the problem: the input was different. So you fed Scilab the same input you had in Fortran and got equal results, so no problem so far. Have you tried feeding Fortran the Scilab input? See if it gives the same results as Scilab. As for the input/output variation, it's not that surprising to me if your system is poorly conditioned, especially at some points of interest (near the resonance frequency). Best regards, Paul On 08/21/2016 06:51 PM, Claus Futtrup wrote: > Hi there > > OK, so I went ahead and took some Fortran input ... yes, I do get the > same output as Fortran, so it seems there's no calculation error per > se in Scilab. It's just tiny differences in the input which generate > large differences in output. It's scary. > > If you compare the input (dz1 in scilab vs. dz1 in fortran, you get > differences of around : > > 1->dz1s./dz1f > ans = > > 0.9998331 + 0.0000339i > 0.9998132 + 0.0000391i > 0.9998197 + 0.0000391i > > > And if you compare input for dz2, you get similar tiny differences : > > -1->dz2s./dz2f > ans = > > 0.9999629 + 0.0000126i > 0.9999600 + 0.0000145i > 0.9999635 + 0.0000145i > > The difference in magnitude is on the scale of less than 0.02%. > > Here's a complete script, including comments which shows the results > and explains. I only include the three datapoints around fs, which are > of interest: > > // dz_test.sce > > // Scilab input/output for zm_star: > > dz1s = [-0.503483777422459-0.5757953650438843*%i > -0.5114164682962974-0.5883274915921053*%i > -0.5189524114871444-0.6013228498050527*%i] > > dz2s = [-0.9956247120533783-1.1585555511721832*%i > -1.019729681961281-1.1864195137402458*%i > -1.0436439978573127-1.2149095747738672*%i] > > mu = 1.997015667744342; > > zm_star = (1-mu)* dz1s .* dz2s ./ (dz2s-mu*dz1s); > > // = > // 67.582546 - 57.549843i > // 104.56363 + 0.9610187i > // 64.846465 + 47.016802i > > // Fortran input: > > dz1f = [-0.50358736782056468-0.57587442109900699*%i > -0.51153502148422891-0.58841744553307240*%i > -0.51906952093260994-0.60141095056474114*%i] > > dz2f = [-0.99567617243878548-1.1585859673221321*%i > -1.0197876382178386-1.1864521484345998*%i > -1.0436997434456954-1.2149387979780446*%i] > > zm_star = (1-mu)* dz1f .* dz2f ./ (dz2f-mu*dz1f); > > // Scilab output: > > // = > // 66.547108 - 58.427427i > // 105.67638 - 0.8443203i > // 66.018415 + 47.279403i > > // Fortran output: > // ( 66.547108467527437 , -58.427426595183157 ) > // ( 105.67638116311093 ,-0.84432029182632362 ) > // ( 66.018415098214774 , 47.279402998470466 ) > > As can be seen. Scilab gives the same output as Fortran, when the > input is the same. > > I'm just totally surprised how such small differences in input can > generate such large differences in output. > > Best regards, > Claus > > On 21-08-2016 16:11, Claus Futtrup wrote: >> >> Dear Scilab Users >> >> I have a script, which imitates a Fortran script. I can see there's a >> difference in calculation of about 1%, which is very strange to me. >> Input parameters (dz1 and dz2 vectors, length 1200) to the equation >> seem to agree within 0,1% ... so right now my theory is that the >> precision slips away when I do the following calculation: >> >> Scilab: zm_star = (1-mu)* dz1 .* dz2 ./ (dz2-mu*dz1); // model free >> mech. impedance >> >> Fortran: zm_star = (1-mu)*dz1*dz2/(dz2-mu*dz1) >> >> Do you see anything in the Scilab formulation, which should worry me >> / which would give me such a high error? >> >> P.S. mu is a mass-ratio = 1.9970156677443420... and it's exactly the >> same value in both Scilab and Fortran. >> >> Most of the calculations in the output vector are OK, but in >> particular around the resonance frequency, I can list the following >> three datapoints (zm_star(47:49)), to show what is worrying me: >> >> In Fortran, data no. 47-48-49 (near fs): >> >> ( 66.547108467527437 , -58.427426595183157 ) >> ( 105.67638116311093 ,-0.84432029182632362 ) >> ( 66.018415098214774 , 47.279402998470466 ) >> >> Whereas in Scilab I get: >> >> 67.58254632254881 - 57.549843258298814*%i >> 104.56362768103634 + 0.9610187273575014*%i >> 64.84646498264745 + 47.01680213507681*%i >> >> In particular the imaginary part is different at the middle data >> point (near fs) where from Fortran the value is negative, whereas in >> Scilab the value is positive. It seems that the calculation of >> zm_star involves some math operations that could be critical to the >> precision. >> >> If you study the impedance magnitude (pythagoras...), the results >> from Fortran are about 1% higher in value - IMHO that's non-negligible. >> >> Studying the Nyquist circle plot of the data, it seems to me that in >> general the Fortran calculation is more correct. >> >> What is going wrong with the Scilab equation? Please let me know if >> you have any ideas how to increase the precision of the calculation. >> Thanks. >> >> P.S. I'm using Scilab 5.5.0 (64 bit, Windows 10). Could it be the >> Intel Math Kernel that's doing this wrong? >> >> /Claus >> > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Mon Aug 22 17:21:55 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 22 Aug 2016 17:21:55 +0200 Subject: [Scilab-users] Numerical precision In-Reply-To: References: Message-ID: <233cf9e7-b850-1b22-7844-e0986ea58400@gmail.com> Hi Paul Yes, you're right. Sorry for disturbing the Scilab list. >it's not that surprising to me if your system is poorly conditioned I'm surprised, but this seems to be the culprit. /Claus On 22-08-2016 09:06, Paul Bignier wrote: > > > Hello Claus, > > If I get this right, after finding discrepancies between Scilab & > Fortran, you identified the origin of the problem: the input was > different. > > So you fed Scilab the same input you had in Fortran and got equal > results, so no problem so far. > > Have you tried feeding Fortran the Scilab input? See if it gives the > same results as Scilab. > > As for the input/output variation, it's not that surprising to me if > your system is poorly conditioned, especially at some points of > interest (near the resonance frequency). > > Best regards, > > Paul > > > On 08/21/2016 06:51 PM, Claus Futtrup wrote: >> Hi there >> >> OK, so I went ahead and took some Fortran input ... yes, I do get the >> same output as Fortran, so it seems there's no calculation error per >> se in Scilab. It's just tiny differences in the input which generate >> large differences in output. It's scary. >> >> If you compare the input (dz1 in scilab vs. dz1 in fortran, you get >> differences of around : >> >> 1->dz1s./dz1f >> ans = >> >> 0.9998331 + 0.0000339i >> 0.9998132 + 0.0000391i >> 0.9998197 + 0.0000391i >> >> >> And if you compare input for dz2, you get similar tiny differences : >> >> -1->dz2s./dz2f >> ans = >> >> 0.9999629 + 0.0000126i >> 0.9999600 + 0.0000145i >> 0.9999635 + 0.0000145i >> >> The difference in magnitude is on the scale of less than 0.02%. >> >> Here's a complete script, including comments which shows the results >> and explains. I only include the three datapoints around fs, which >> are of interest: >> >> // dz_test.sce >> >> // Scilab input/output for zm_star: >> >> dz1s = [-0.503483777422459-0.5757953650438843*%i >> -0.5114164682962974-0.5883274915921053*%i >> -0.5189524114871444-0.6013228498050527*%i] >> >> dz2s = [-0.9956247120533783-1.1585555511721832*%i >> -1.019729681961281-1.1864195137402458*%i >> -1.0436439978573127-1.2149095747738672*%i] >> >> mu = 1.997015667744342; >> >> zm_star = (1-mu)* dz1s .* dz2s ./ (dz2s-mu*dz1s); >> >> // = >> // 67.582546 - 57.549843i >> // 104.56363 + 0.9610187i >> // 64.846465 + 47.016802i >> >> // Fortran input: >> >> dz1f = [-0.50358736782056468-0.57587442109900699*%i >> -0.51153502148422891-0.58841744553307240*%i >> -0.51906952093260994-0.60141095056474114*%i] >> >> dz2f = [-0.99567617243878548-1.1585859673221321*%i >> -1.0197876382178386-1.1864521484345998*%i >> -1.0436997434456954-1.2149387979780446*%i] >> >> zm_star = (1-mu)* dz1f .* dz2f ./ (dz2f-mu*dz1f); >> >> // Scilab output: >> >> // = >> // 66.547108 - 58.427427i >> // 105.67638 - 0.8443203i >> // 66.018415 + 47.279403i >> >> // Fortran output: >> // ( 66.547108467527437 , -58.427426595183157 ) >> // ( 105.67638116311093 ,-0.84432029182632362 ) >> // ( 66.018415098214774 , 47.279402998470466 ) >> >> As can be seen. Scilab gives the same output as Fortran, when the >> input is the same. >> >> I'm just totally surprised how such small differences in input can >> generate such large differences in output. >> >> Best regards, >> Claus >> >> On 21-08-2016 16:11, Claus Futtrup wrote: >>> >>> Dear Scilab Users >>> >>> I have a script, which imitates a Fortran script. I can see there's >>> a difference in calculation of about 1%, which is very strange to >>> me. Input parameters (dz1 and dz2 vectors, length 1200) to the >>> equation seem to agree within 0,1% ... so right now my theory is >>> that the precision slips away when I do the following calculation: >>> >>> Scilab: zm_star = (1-mu)* dz1 .* dz2 ./ (dz2-mu*dz1); // model free >>> mech. impedance >>> >>> Fortran: zm_star = (1-mu)*dz1*dz2/(dz2-mu*dz1) >>> >>> Do you see anything in the Scilab formulation, which should worry me >>> / which would give me such a high error? >>> >>> P.S. mu is a mass-ratio = 1.9970156677443420... and it's exactly the >>> same value in both Scilab and Fortran. >>> >>> Most of the calculations in the output vector are OK, but in >>> particular around the resonance frequency, I can list the following >>> three datapoints (zm_star(47:49)), to show what is worrying me: >>> >>> In Fortran, data no. 47-48-49 (near fs): >>> >>> ( 66.547108467527437 , -58.427426595183157 ) >>> ( 105.67638116311093 ,-0.84432029182632362 ) >>> ( 66.018415098214774 , 47.279402998470466 ) >>> >>> Whereas in Scilab I get: >>> >>> 67.58254632254881 - 57.549843258298814*%i >>> 104.56362768103634 + 0.9610187273575014*%i >>> 64.84646498264745 + 47.01680213507681*%i >>> >>> In particular the imaginary part is different at the middle data >>> point (near fs) where from Fortran the value is negative, whereas in >>> Scilab the value is positive. It seems that the calculation of >>> zm_star involves some math operations that could be critical to the >>> precision. >>> >>> If you study the impedance magnitude (pythagoras...), the results >>> from Fortran are about 1% higher in value - IMHO that's non-negligible. >>> >>> Studying the Nyquist circle plot of the data, it seems to me that in >>> general the Fortran calculation is more correct. >>> >>> What is going wrong with the Scilab equation? Please let me know if >>> you have any ideas how to increase the precision of the calculation. >>> Thanks. >>> >>> P.S. I'm using Scilab 5.5.0 (64 bit, Windows 10). Could it be the >>> Intel Math Kernel that's doing this wrong? >>> >>> /Claus >>> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -- > Paul BIGNIER > Development engineer > ----------------------------------------------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles, France > Phone: +33.1.80.77.04.68 > http://www.scilab-enterprises.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 arvid at softube.com Mon Aug 22 12:54:52 2016 From: arvid at softube.com (=?Windows-1252?Q?Arvid_Ros=E9n?=) Date: Mon, 22 Aug 2016 10:54:52 +0000 Subject: [Scilab-users] Numerical precision In-Reply-To: References: , Message-ID: One thing to watch out for in cases like this is the old extended precision 80-bit floating point format. Scilab 5 doesn't use it, but the Fortan program might do I guess. Scilab 4 used it too, and when I switched from version 4 to 5 some numerical results related to resonant filters changed in my setup. Cheers, Arvid Get Outlook for iOS ________________________________ From: users on behalf of Paul Bignier Sent: Monday, August 22, 2016 9:06:50 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Numerical precision Hello Claus, If I get this right, after finding discrepancies between Scilab & Fortran, you identified the origin of the problem: the input was different. So you fed Scilab the same input you had in Fortran and got equal results, so no problem so far. Have you tried feeding Fortran the Scilab input? See if it gives the same results as Scilab. As for the input/output variation, it's not that surprising to me if your system is poorly conditioned, especially at some points of interest (near the resonance frequency). Best regards, Paul On 08/21/2016 06:51 PM, Claus Futtrup wrote: Hi there OK, so I went ahead and took some Fortran input ... yes, I do get the same output as Fortran, so it seems there's no calculation error per se in Scilab. It's just tiny differences in the input which generate large differences in output. It's scary. If you compare the input (dz1 in scilab vs. dz1 in fortran, you get differences of around : 1->dz1s./dz1f ans = 0.9998331 + 0.0000339i 0.9998132 + 0.0000391i 0.9998197 + 0.0000391i And if you compare input for dz2, you get similar tiny differences : -1->dz2s./dz2f ans = 0.9999629 + 0.0000126i 0.9999600 + 0.0000145i 0.9999635 + 0.0000145i The difference in magnitude is on the scale of less than 0.02%. Here's a complete script, including comments which shows the results and explains. I only include the three datapoints around fs, which are of interest: // dz_test.sce // Scilab input/output for zm_star: dz1s = [-0.503483777422459-0.5757953650438843*%i -0.5114164682962974-0.5883274915921053*%i -0.5189524114871444-0.6013228498050527*%i] dz2s = [-0.9956247120533783-1.1585555511721832*%i -1.019729681961281-1.1864195137402458*%i -1.0436439978573127-1.2149095747738672*%i] mu = 1.997015667744342; zm_star = (1-mu)* dz1s .* dz2s ./ (dz2s-mu*dz1s); // = // 67.582546 - 57.549843i // 104.56363 + 0.9610187i // 64.846465 + 47.016802i // Fortran input: dz1f = [-0.50358736782056468-0.57587442109900699*%i -0.51153502148422891-0.58841744553307240*%i -0.51906952093260994-0.60141095056474114*%i] dz2f = [-0.99567617243878548-1.1585859673221321*%i -1.0197876382178386-1.1864521484345998*%i -1.0436997434456954-1.2149387979780446*%i] zm_star = (1-mu)* dz1f .* dz2f ./ (dz2f-mu*dz1f); // Scilab output: // = // 66.547108 - 58.427427i // 105.67638 - 0.8443203i // 66.018415 + 47.279403i // Fortran output: // ( 66.547108467527437 , -58.427426595183157 ) // ( 105.67638116311093 ,-0.84432029182632362 ) // ( 66.018415098214774 , 47.279402998470466 ) As can be seen. Scilab gives the same output as Fortran, when the input is the same. I'm just totally surprised how such small differences in input can generate such large differences in output. Best regards, Claus On 21-08-2016 16:11, Claus Futtrup wrote: Dear Scilab Users I have a script, which imitates a Fortran script. I can see there's a difference in calculation of about 1%, which is very strange to me. Input parameters (dz1 and dz2 vectors, length 1200) to the equation seem to agree within 0,1% ... so right now my theory is that the precision slips away when I do the following calculation: Scilab: zm_star = (1-mu)* dz1 .* dz2 ./ (dz2-mu*dz1); // model free mech. impedance Fortran: zm_star = (1-mu)*dz1*dz2/(dz2-mu*dz1) Do you see anything in the Scilab formulation, which should worry me / which would give me such a high error? P.S. mu is a mass-ratio = 1.9970156677443420... and it's exactly the same value in both Scilab and Fortran. Most of the calculations in the output vector are OK, but in particular around the resonance frequency, I can list the following three datapoints (zm_star(47:49)), to show what is worrying me: In Fortran, data no. 47-48-49 (near fs): ( 66.547108467527437 , -58.427426595183157 ) ( 105.67638116311093 ,-0.84432029182632362 ) ( 66.018415098214774 , 47.279402998470466 ) Whereas in Scilab I get: 67.58254632254881 - 57.549843258298814*%i 104.56362768103634 + 0.9610187273575014*%i 64.84646498264745 + 47.01680213507681*%i In particular the imaginary part is different at the middle data point (near fs) where from Fortran the value is negative, whereas in Scilab the value is positive. It seems that the calculation of zm_star involves some math operations that could be critical to the precision. If you study the impedance magnitude (pythagoras...), the results from Fortran are about 1% higher in value - IMHO that's non-negligible. Studying the Nyquist circle plot of the data, it seems to me that in general the Fortran calculation is more correct. What is going wrong with the Scilab equation? Please let me know if you have any ideas how to increase the precision of the calculation. Thanks. P.S. I'm using Scilab 5.5.0 (64 bit, Windows 10). Could it be the Intel Math Kernel that's doing this wrong? /Claus _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Mon Aug 22 20:54:02 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 22 Aug 2016 20:54:02 +0200 Subject: [Scilab-users] Numerical precision In-Reply-To: References: Message-ID: Hi Arvid Thanks for the tip. I'll investigate the precision I have in Fortran. /Claus On 22-08-2016 12:54, Arvid Ros?n wrote: > One thing to watch out for in cases like this is the old extended > precision 80-bit floating point format. Scilab 5 doesn't use it, but > the Fortan program might do I guess. Scilab 4 used it too, and when I > switched from version 4 to 5 some numerical results related to > resonant filters changed in my setup. > > Cheers, > Arvid > > Get Outlook for iOS > > ------------------------------------------------------------------------ > *From:* users on behalf of Paul > Bignier > *Sent:* Monday, August 22, 2016 9:06:50 AM > *To:* Users mailing list for Scilab > *Subject:* Re: [Scilab-users] Numerical precision > > > Hello Claus, > > If I get this right, after finding discrepancies between Scilab & > Fortran, you identified the origin of the problem: the input was > different. > > So you fed Scilab the same input you had in Fortran and got equal > results, so no problem so far. > > Have you tried feeding Fortran the Scilab input? See if it gives the > same results as Scilab. > > As for the input/output variation, it's not that surprising to me if > your system is poorly conditioned, especially at some points of > interest (near the resonance frequency). > > Best regards, > > Paul > > > On 08/21/2016 06:51 PM, Claus Futtrup wrote: >> Hi there >> >> OK, so I went ahead and took some Fortran input ... yes, I do get the >> same output as Fortran, so it seems there's no calculation error per >> se in Scilab. It's just tiny differences in the input which generate >> large differences in output. It's scary. >> >> If you compare the input (dz1 in scilab vs. dz1 in fortran, you get >> differences of around : >> >> 1->dz1s./dz1f >> ans = >> >> 0.9998331 + 0.0000339i >> 0.9998132 + 0.0000391i >> 0.9998197 + 0.0000391i >> >> >> And if you compare input for dz2, you get similar tiny differences : >> >> -1->dz2s./dz2f >> ans = >> >> 0.9999629 + 0.0000126i >> 0.9999600 + 0.0000145i >> 0.9999635 + 0.0000145i >> >> The difference in magnitude is on the scale of less than 0.02%. >> >> Here's a complete script, including comments which shows the results >> and explains. I only include the three datapoints around fs, which >> are of interest: >> >> // dz_test.sce >> >> // Scilab input/output for zm_star: >> >> dz1s = [-0.503483777422459-0.5757953650438843*%i >> -0.5114164682962974-0.5883274915921053*%i >> -0.5189524114871444-0.6013228498050527*%i] >> >> dz2s = [-0.9956247120533783-1.1585555511721832*%i >> -1.019729681961281-1.1864195137402458*%i >> -1.0436439978573127-1.2149095747738672*%i] >> >> mu = 1.997015667744342; >> >> zm_star = (1-mu)* dz1s .* dz2s ./ (dz2s-mu*dz1s); >> >> // = >> // 67.582546 - 57.549843i >> // 104.56363 + 0.9610187i >> // 64.846465 + 47.016802i >> >> // Fortran input: >> >> dz1f = [-0.50358736782056468-0.57587442109900699*%i >> -0.51153502148422891-0.58841744553307240*%i >> -0.51906952093260994-0.60141095056474114*%i] >> >> dz2f = [-0.99567617243878548-1.1585859673221321*%i >> -1.0197876382178386-1.1864521484345998*%i >> -1.0436997434456954-1.2149387979780446*%i] >> >> zm_star = (1-mu)* dz1f .* dz2f ./ (dz2f-mu*dz1f); >> >> // Scilab output: >> >> // = >> // 66.547108 - 58.427427i >> // 105.67638 - 0.8443203i >> // 66.018415 + 47.279403i >> >> // Fortran output: >> // ( 66.547108467527437 , -58.427426595183157 ) >> // ( 105.67638116311093 ,-0.84432029182632362 ) >> // ( 66.018415098214774 , 47.279402998470466 ) >> >> As can be seen. Scilab gives the same output as Fortran, when the >> input is the same. >> >> I'm just totally surprised how such small differences in input can >> generate such large differences in output. >> >> Best regards, >> Claus >> >> On 21-08-2016 16:11, Claus Futtrup wrote: >>> >>> Dear Scilab Users >>> >>> I have a script, which imitates a Fortran script. I can see there's >>> a difference in calculation of about 1%, which is very strange to >>> me. Input parameters (dz1 and dz2 vectors, length 1200) to the >>> equation seem to agree within 0,1% ... so right now my theory is >>> that the precision slips away when I do the following calculation: >>> >>> Scilab: zm_star = (1-mu)* dz1 .* dz2 ./ (dz2-mu*dz1); // model free >>> mech. impedance >>> >>> Fortran: zm_star = (1-mu)*dz1*dz2/(dz2-mu*dz1) >>> >>> Do you see anything in the Scilab formulation, which should worry me >>> / which would give me such a high error? >>> >>> P.S. mu is a mass-ratio = 1.9970156677443420... and it's exactly the >>> same value in both Scilab and Fortran. >>> >>> Most of the calculations in the output vector are OK, but in >>> particular around the resonance frequency, I can list the following >>> three datapoints (zm_star(47:49)), to show what is worrying me: >>> >>> In Fortran, data no. 47-48-49 (near fs): >>> >>> ( 66.547108467527437 , -58.427426595183157 ) >>> ( 105.67638116311093 ,-0.84432029182632362 ) >>> ( 66.018415098214774 , 47.279402998470466 ) >>> >>> Whereas in Scilab I get: >>> >>> 67.58254632254881 - 57.549843258298814*%i >>> 104.56362768103634 + 0.9610187273575014*%i >>> 64.84646498264745 + 47.01680213507681*%i >>> >>> In particular the imaginary part is different at the middle data >>> point (near fs) where from Fortran the value is negative, whereas in >>> Scilab the value is positive. It seems that the calculation of >>> zm_star involves some math operations that could be critical to the >>> precision. >>> >>> If you study the impedance magnitude (pythagoras...), the results >>> from Fortran are about 1% higher in value - IMHO that's non-negligible. >>> >>> Studying the Nyquist circle plot of the data, it seems to me that in >>> general the Fortran calculation is more correct. >>> >>> What is going wrong with the Scilab equation? Please let me know if >>> you have any ideas how to increase the precision of the calculation. >>> Thanks. >>> >>> P.S. I'm using Scilab 5.5.0 (64 bit, Windows 10). Could it be the >>> Intel Math Kernel that's doing this wrong? >>> >>> /Claus >>> >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -- > Paul BIGNIER > Development engineer > ----------------------------------------------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles, France > Phone: +33.1.80.77.04.68 > http://www.scilab-enterprises.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 paul.carrico at esterline.com Tue Aug 23 13:56:13 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Tue, 23 Aug 2016 11:56:13 +0000 Subject: [Scilab-users] Whay False Message-ID: <3A6B7233274DB449A2A0053A47684F953F6F53F9@BGS-EX01.auxitrol.ad> Hi All, I spent a lot of time in looking for an issue in my code ; finally I found the origin but I do not understand why ... probably a very basic reason :| Any suggestion regarding the code here after ? Thanks Paul ######################################################### mode(0) a = 2.05 entier = int(a) reel = modulo(a,2) if ( reel == 0.05) then chaine = '05' elseif (reel == 0.5) then chaine = '50' else chaine = '00' end printf("chaine = %s\n',chaine) // Nota reel == 0.05 // whay False ????? EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Aug 23 14:20:53 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 23 Aug 2016 12:20:53 +0000 Subject: [Scilab-users] Whay False In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F6F53F9@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F6F53F9@BGS-EX01.auxitrol.ad> Message-ID: Hi Paul, Note that reel-0.05 = -1.804D-16 not zero. You need to use error bars to test equality of reals, ex: if abs(reel-0.05)< %eps (or Subject: [Scilab-users] Whay False Hi All, I spent a lot of time in looking for an issue in my code ; finally I found the origin but I do not understand why ... probably a very basic reason :| Any suggestion regarding the code here after ? Thanks Paul ######################################################### mode(0) a = 2.05 entier = int(a) reel = modulo(a,2) if ( reel == 0.05) then chaine = '05' elseif (reel == 0.5) then chaine = '50' else chaine = '00' end printf("chaine = %s\n',chaine) // Nota reel == 0.05 // whay False ????? EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Aug 23 14:27:09 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 23 Aug 2016 14:27:09 +0200 Subject: [Scilab-users] Whay False In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F6F53F9@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F6F53F9@BGS-EX01.auxitrol.ad> Message-ID: <57BC411D.4010003@free.fr> Hello, Le 23/08/2016 13:56, Carrico, Paul a ?crit : > > Hi All, > > I spent a lot of time in looking for an issue in my code ; finally I > found the origin but I do not understand why ? probably a very basic > reason K > > Any suggestion regarding the code here after ? > --> modulo(2.05, 2) - 0.05 ans = -1.804D-16 This is a classical result in /Numerical computing/. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at esterline.com Tue Aug 23 14:18:16 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Tue, 23 Aug 2016 12:18:16 +0000 Subject: [Scilab-users] Whay False In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F6F53F9@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F6F53F9@BGS-EX01.auxitrol.ad> Message-ID: <3A6B7233274DB449A2A0053A47684F953F6F540A@BGS-EX01.auxitrol.ad> In addition, if you test the following : a = 2.05 b = a -2 b -0.05 ? not equal to 0 ??? (see attachement) format issue ? threshold one ? .. on a so basic operation ???? Paul [cid:image001.png at 01D1FD49.2B1C9B30] EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data De : Carrico, Paul Envoy? : mardi 23 ao?t 2016 13:56 ? : International users mailing list for Scilab. (users at lists.scilab.org) Objet : Whay False Hi All, I spent a lot of time in looking for an issue in my code ; finally I found the origin but I do not understand why ... probably a very basic reason :| Any suggestion regarding the code here after ? Thanks Paul ######################################################### mode(0) a = 2.05 entier = int(a) reel = modulo(a,2) if ( reel == 0.05) then chaine = '05' elseif (reel == 0.5) then chaine = '50' else chaine = '00' end printf("chaine = %s\n',chaine) // Nota reel == 0.05 // whay False ????? EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 6571 bytes Desc: image001.png URL: From paul.carrico at esterline.com Tue Aug 23 14:43:41 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Tue, 23 Aug 2016 12:43:41 +0000 Subject: [Scilab-users] [EXTERNAL] Re: Whay False In-Reply-To: <57BC411D.4010003@free.fr> References: <3A6B7233274DB449A2A0053A47684F953F6F53F9@BGS-EX01.auxitrol.ad> <57BC411D.4010003@free.fr> Message-ID: <3A6B7233274DB449A2A0053A47684F953F6F542B@BGS-EX01.auxitrol.ad> I've had like a newbie .... Thanks for the lesson :) EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data De : users [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon Envoy? : mardi 23 ao?t 2016 14:27 ? : Users mailing list for Scilab Objet : [EXTERNAL] Re: [Scilab-users] Whay False Hello, Le 23/08/2016 13:56, Carrico, Paul a ?crit : Hi All, I spent a lot of time in looking for an issue in my code ; finally I found the origin but I do not understand why ... probably a very basic reason :| Any suggestion regarding the code here after ? --> modulo(2.05, 2) - 0.05 ans = -1.804D-16 This is a classical result in Numerical computing. -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Tue Aug 23 14:59:08 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Tue, 23 Aug 2016 14:59:08 +0200 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ID89PT91dGYtOD9xPyBbRVhU?= =?utf-8?q?ERNAL=5D_Re=3A_Whay_False?= In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F6F542B@BGS-EX01.auxitrol.ad> Message-ID: <99d-57bc4880-5-5876c30@257233534> Hello Paul, We all make the same mistake at some point. I did it few years ago and someone mentioned this article: "What every computer scientist should know about floating-point arithmetic" by David Goldberg. It's available online, for example here: http://perso.ens-lyon.fr/jean-michel.muller/goldberg.pdf I think it's worth reading it. Cheers, Antoine Le Mardi, Ao?t 23, 2016 14:43 CEST, "Carrico, Paul" a ?crit: > I've had like a newbie .... > > Thanks for the lesson :) > > EXPORT CONTROL : > Cet email ne contient pas de donn?es techniques > This email does not contain technical data > > De : users [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon > Envoy? : mardi 23 ao?t 2016 14:27 > ? : Users mailing list for Scilab > Objet : [EXTERNAL] Re: [Scilab-users] Whay False > > Hello, > > Le 23/08/2016 13:56, Carrico, Paul a ?crit : > Hi All, > > I spent a lot of time in looking for an issue in my code ; finally I found the origin but I do not understand why ... probably a very basic reason :| > > Any suggestion regarding the code here after ? > --> modulo(2.05, 2) - 0.05 > ans = > > -1.804D-16 > > This is a classical result in Numerical computing. From sgougeon at free.fr Tue Aug 23 18:03:24 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 23 Aug 2016 18:03:24 +0200 Subject: [Scilab-users] ATOMS web : display issue for statistics categories Message-ID: <57BC73CC.1080607@free.fr> Dear all, When i try to list atoms modules in the Statistics categories, i get an empty list, despite the number of existing modules is well displayed (please see below). https://atoms.scilab.org/categories/data_analysis_-_statistics The name of the module / sub-module is not displayed in the "You are here: home |....." path. It's OK for all other categories, but displaying this one looks bugged. Do you get the same? Regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bddecfjj.png Type: image/png Size: 67255 bytes Desc: not available URL: From rouxph.22 at gmail.com Wed Aug 24 16:00:41 2016 From: rouxph.22 at gmail.com (philippe) Date: Wed, 24 Aug 2016 16:00:41 +0200 Subject: [Scilab-users] plot2d problem In-Reply-To: <087a01d1fb75$09673840$1c35a8c0$@liftoff.at> References: <087a01d1fb75$09673840$1c35a8c0$@liftoff.at> Message-ID: Hi, Le 21/08/2016 ? 08:27, Gerhard Kreuzer a ?crit : > > here my two attepts one working, one failed, but why? > > > > plot2d(x, [y z]); > > //plot2d(x, y); // working > > //plot2d(x, z); // working if x,y,z are column vectors of the same length you should try : plot2d([x x],[y z],[y_color z_color]) the argument [y_color z_color] is optional but it let you choose the colors for both plots (try [2 5] for [y_color z_color]). Philippe. From j-lan at online.no Wed Aug 24 18:36:37 2016 From: j-lan at online.no (=?UTF-8?Q?Jan_=c3=85ge_Langeland?=) Date: Wed, 24 Aug 2016 18:36:37 +0200 Subject: [Scilab-users] plot2d problem In-Reply-To: References: <087a01d1fb75$09673840$1c35a8c0$@liftoff.at> Message-ID: <43050105-845b-c030-28e0-3baa3ff2eaae@online.no> plot2d(x,[y' z'])// ? Jan ? On 24.08.2016 16:00, philippe wrote: > Hi, > > Le 21/08/2016 ? 08:27, Gerhard Kreuzer a ?crit : >> here my two attepts one working, one failed, but why? >> >> >> >> plot2d(x, [y z]); >> >> //plot2d(x, y); // working >> >> //plot2d(x, z); // working > > if x,y,z are column vectors of the same length you should try : > > > plot2d([x x],[y z],[y_color z_color]) > > > the argument [y_color z_color] is optional but it let you choose the > colors for both plots (try [2 5] for [y_color z_color]). > > Philippe. > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From rouxph.22 at gmail.com Wed Aug 24 22:58:39 2016 From: rouxph.22 at gmail.com (philippe) Date: Wed, 24 Aug 2016 22:58:39 +0200 Subject: [Scilab-users] [xcos] zener diode ? Message-ID: Hi, I can't find a zener diode in xcos palettes . Is there an alternative ? Philippe. From sgougeon at free.fr Thu Aug 25 02:30:20 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 25 Aug 2016 02:30:20 +0200 Subject: [Scilab-users] [xcos] zener diode ? In-Reply-To: References: Message-ID: <57BE3C1C.8000500@free.fr> Le 24/08/2016 22:58, philippe a ?crit : > Hi, > > I can't find a zener diode in xcos palettes . Is there an alternative ? Yes: The Coselica external module (on ATOMS) has it, in its Electrical => Semi-conductors section Samuel From paul.carrico at esterline.com Thu Aug 25 11:15:22 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 25 Aug 2016 09:15:22 +0000 Subject: [Scilab-users] how to detect complex solution in "root finding" ? Message-ID: <3A6B7233274DB449A2A0053A47684F953F6F566B@BGS-EX01.auxitrol.ad> Hi all, In an automatic way, how can I ask Scilab to detect complex root (in order to sort them) ; indeed I only want real roots (and to print them in an Ascii file) ! Thanks Paul EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at esterline.com Thu Aug 25 11:26:14 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 25 Aug 2016 09:26:14 +0000 Subject: [Scilab-users] how to detect complex solution in "root finding" ? In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F6F566B@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F6F566B@BGS-EX01.auxitrol.ad> Message-ID: <3A6B7233274DB449A2A0053A47684F953F6F567B@BGS-EX01.auxitrol.ad> I found on internet ... with isreal ... sorry EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data De : users [mailto:users-bounces at lists.scilab.org] De la part de Carrico, Paul Envoy? : jeudi 25 ao?t 2016 11:15 ? : International users mailing list for Scilab. (users at lists.scilab.org) Objet : [EXTERNAL] [Scilab-users] how to detect complex solution in "root finding" ? Hi all, In an automatic way, how can I ask Scilab to detect complex root (in order to sort them) ; indeed I only want real roots (and to print them in an Ascii file) ! Thanks Paul EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data -------------- next part -------------- An HTML attachment was scrubbed... URL: From rouxph.22 at gmail.com Thu Aug 25 15:07:08 2016 From: rouxph.22 at gmail.com (philippe) Date: Thu, 25 Aug 2016 15:07:08 +0200 Subject: [Scilab-users] [xcos] zener diode ? In-Reply-To: <57BE3C1C.8000500@free.fr> References: <57BE3C1C.8000500@free.fr> Message-ID: Le 25/08/2016 ? 02:30, Samuel Gougeon a ?crit : > Le 24/08/2016 22:58, philippe a ?crit : >> Hi, >> >> I can't find a zener diode in xcos palettes . Is there an alternative ? > Yes: The Coselica external module (on ATOMS) has it, in its Electrical > => Semi-conductors section ok, I found it but I have errors during execution : [jenny-a-03:23853] Signal: Segmentation fault (11) [jenny-a-03:23853] Signal code: Address not mapped (1) [jenny-a-03:23853] Failing at address: (nil) Pile d'appel : 1: 0x7da5a9 (/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so) 2: 0x10330 > (/lib/x86_64-linux-gnu/libpthread.so.0) 3: 0x27a48 > (/usr/lib/scilab/libsciscicos.so) 4: 0x2a22c > (/usr/lib/scilab/libsciscicos.so) 5: 0x1753a (/usr/lib/scilab/libscisundials.so.5) 6: 0x2f8c2 (/usr/lib/scilab/libsciscicos.so) 7: 0x1f832 (/usr/lib/scilab/libsciscicos.so) do I need to replace all xcos block with equivalent coselica blocks ? Philippe. From paul.bignier at scilab-enterprises.com Thu Aug 25 16:05:29 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Thu, 25 Aug 2016 16:05:29 +0200 Subject: [Scilab-users] [xcos] zener diode ? In-Reply-To: References: <57BE3C1C.8000500@free.fr> Message-ID: Hi Philippe, This error is more likely due to a version problem, of either Scilab or Coselica. Which version of Scilab do you use, and when does the problem arise? Since the message is pointing to jdk, maybe you should update it. Regards, Paul On 08/25/2016 03:07 PM, philippe wrote: > Le 25/08/2016 ? 02:30, Samuel Gougeon a ?crit : >> Le 24/08/2016 22:58, philippe a ?crit : >>> Hi, >>> >>> I can't find a zener diode in xcos palettes . Is there an alternative ? >> Yes: The Coselica external module (on ATOMS) has it, in its Electrical >> => Semi-conductors section > ok, I found it but I have errors during execution : > > [jenny-a-03:23853] Signal: Segmentation fault (11) > [jenny-a-03:23853] Signal code: Address not mapped > (1) > [jenny-a-03:23853] Failing at address: (nil) > > Pile d'appel : > 1: 0x7da5a9 > (/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so) > 2: 0x10330 > (/lib/x86_64-linux-gnu/libpthread.so.0) > 3: 0x27a48 > (/usr/lib/scilab/libsciscicos.so) > 4: 0x2a22c > (/usr/lib/scilab/libsciscicos.so) > 5: 0x1753a (/usr/lib/scilab/libscisundials.so.5) > 6: 0x2f8c2 (/usr/lib/scilab/libsciscicos.so) > 7: 0x1f832 (/usr/lib/scilab/libsciscicos.so) > > > do I need to replace all xcos block with equivalent coselica blocks ? > > Philippe. > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com From bjne at inmano.com Thu Aug 25 18:53:03 2016 From: bjne at inmano.com (bjarne12) Date: Thu, 25 Aug 2016 09:53:03 -0700 (MST) Subject: [Scilab-users] Plots on second Y axis In-Reply-To: <1462539930722-4034076.post@n3.nabble.com> References: <1776921249.132627694.1360340081532.JavaMail.root@zimbra75-e12.priv.proxad.net> <3B5FFC67498DFF49AE7271A584867D16F1068CF66D@301EX00100.sidel.com> <1462539930722-4034076.post@n3.nabble.com> Message-ID: <1472143983231-4034490.post@n3.nabble.com> This is one way which is based on the description in https://commons.wikimedia.org/wiki/File:Trace_ln_sqrt_1_2_deux_echelles_scilab.svg, but with some changes. Draw the second graph first (the one for the right y-axis). Then in the second plot, draw the first graph for the left axis and the same graph again in the same plot, but with the visual characteristics of the second graph. So if the first graph is a blue line and the second is made of red dots, first draw the first graph as a blue line and then again as red dots. Then set the red graph as invisible. This way the legend command will add both graphs. I reckon it will work for more graphs as well, but I haven't tested it. Here is some example code: a1 = newaxes(); //make right y-axis a1.filled = 'off'; a1.axes_visible(1) = 'off'; a1.tight_limits = 'on'; a1.y_location = 'right'; a1.auto_ticks = ['off', 'on', 'on']; //remove ticks on first x-axis a1.x_ticks.locations = []; plot(x, y2, lin2); //plot graph 2 ylabel('add label', 'fontsize', 3); //add label to right y-axis a2 = newaxes(); //make left y-axis a2.filled = 'off'; a2.tight_limits = 'on'; plot(x, y1, lin1); //plot graph 1 plot(x, y1, lin2); //plot invisible graph 1 with colours of graph 2 (so a legend can be added) y = gca(); LinE = y.children.children(1); LinE.visible = 'off'; xlabel('add label', 'fontsize', 3); //add label to x-axis ylabel('add label, 'fontsize', 3); //add label to left y-axis -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Plots-on-second-Y-axis-tp4025895p4034490.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From gerhard.kreuzer at liftoff.at Fri Aug 26 12:35:10 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 26 Aug 2016 03:35:10 -0700 (MST) Subject: [Scilab-users] Regex problem In-Reply-To: <57B73E6B.6090401@free.fr> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <57B72E27.5020502@free.fr> <57B73E6B.6090401@free.fr> Message-ID: <1472207710226-4034495.post@n3.nabble.com> Hi, thanks all for responding. Semms there is some Problem with my account, cause I dont get any Response for days and I am wondering about that. Checking out this issue I see, there is lot of Response, but the notification Fails. Ok, will work through it. New stata: I generated test data and was able to read the data, than I started to create real data and now I fail reading the data. No, it is not a Problem of the data Format or something like that, just regex Fails now for some reason .. I will add sample files, but have to find out how this works here. With best regards Gerhard -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034495.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From skiba.g at gmail.com Fri Aug 26 12:36:42 2016 From: skiba.g at gmail.com (Grzegorz Skiba) Date: Fri, 26 Aug 2016 12:36:42 +0200 Subject: [Scilab-users] Intensive memory allocation when changing plot X axes ticks. Message-ID: Dear Scilab users, in my application I use plot and custom X axes ticks labes (timestamps). Aplication has to run for at least 24hours, but after few hours Windows terminates Scilab due to low memory. We noticed that chenging plot X labels causes memory allocation which results Scilab termination by OS. Here is a example code: x = 0:0.1:100; y = sin(x); plot(x,y); plot_handle = gca(); while 1 ticks = plot_handle.x_ticks cur_time = round(clock()); ticks.labels = [ticks.labels(2:max(size(ticks.locations)));.. string(cur_time(4)) + ":" +.. // hour string(cur_time(5)) + ":" +.. // minute string(cur_time(6))]; // second plot_handle.x_ticks = ticks; sleep(50); end What can cause such intensive memory allocation? Is there any workaround for this problem ? [image: Obraz w tre?ci 1][image: Obraz w tre?ci 2] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: memory_leak_x_ticks_total_ram.PNG Type: image/png Size: 2574 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: memory_leak_x_ticks.PNG Type: image/png Size: 5010 bytes Desc: not available URL: From gerhard.kreuzer at liftoff.at Fri Aug 26 12:55:21 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 26 Aug 2016 03:55:21 -0700 (MST) Subject: [Scilab-users] plot2d problem In-Reply-To: <43050105-845b-c030-28e0-3baa3ff2eaae@online.no> References: <087a01d1fb75$09673840$1c35a8c0$@liftoff.at> <43050105-845b-c030-28e0-3baa3ff2eaae@online.no> Message-ID: <1472208921257-4034497.post@n3.nabble.com> Hi thanks, indeed, it was a problem of the vector format. Now I change that and it works. x(1, :) = vals(:, 1) // Define x axes state = vals(:, 2) * 4.0/(2^23-1) pots(:, 1) = vals(:, 3) * potScaling(1) + potOffset(1) // Sure there is a better way to do that pots(:, 2) = vals(:, 4) * potScaling(2) + potOffset(2) current = vals(:, 7) * currScaling + currOffset voltage = vals(:, 8) * uScaling + uOffset scf(); // Open a graphic window plot2d(x, [state pots current]); // Plot State, potential channel 0 and current Hope this is more or less the scilab style (I am newbee to scilab) With best regards Gerhard -- View this message in context: http://mailinglists.scilab.org/Scilab-users-plot2d-problem-tp4034454p4034497.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From gerhard.kreuzer at liftoff.at Fri Aug 26 13:02:53 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 26 Aug 2016 04:02:53 -0700 (MST) Subject: [Scilab-users] ?==?utf-8?q? Regex problem In-Reply-To: <3384-57b6f500-23-7fcb5280@87778715> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <3384-57b6f500-23-7fcb5280@87778715> Message-ID: <1472209373959-4034498.post@n3.nabble.com> Hi Antoine, I am new to scilab, so I don't know how the pattern matching is working there. I successfully process my file using .net Framworks Regex class. Yes, I can do it without regex, but I don't want to reinvent the wheel, so I first try to use Standard functions. ((Hoping that the implementation is ok)) I don't Need named Groups, as I found out later cause Scilab can't do anything with this Groups, so maybe this can be ommited. With best regards Gerhard -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034498.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From gerhard.kreuzer at liftoff.at Fri Aug 26 13:11:30 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 26 Aug 2016 04:11:30 -0700 (MST) Subject: [Scilab-users] Regex problem In-Reply-To: <57B723BA.9050302@free.fr> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> Message-ID: <1472209890445-4034499.post@n3.nabble.com> Hi Samuel, thanks for that, will try it. I just want to read the meta data, which were strings and find the Point where the binary data starts. Than I start reading the binary data using mgeti ... From the meta data I know the amount of binary data, so I know where binary data Ends and next meta data starts. [dataStart,dataEnd,dataMatch,data]=regexp(strData,'/#data#/') // Analyze meta data [adcStart,adcEnd,adcMatch,adcInstructions]=regexp(instructions,'/adc\s*(?P\d+) (?P\d+)/') adcStartingPoints = evstr(adcInstructions(:, 1)) adcSampleCounts = evstr(adcInstructions(:, 2)) mseek(dataEnd, fdRawData, 'set'); // Set pointer to start of binary data block i = 1 j = 1 // Read the block, into a matrix for k = 1:size(adcInstructions, 'r') sampleCount = adcSampleCounts(k,1); i = 1 while i <= sampleCount do vals(j, 1) = adcStartingPoints(k, 1)* 1e-3 + (i-1)/sampleRate; // Use column 1 for timestamp vals(j, 2:8) = mgeti(7,'il',fdRawData); // Use column 2 to 8 for state and data i = i + 1; j = j + 1; end // Is there more? pos = mtell(fdRawData) //strData = mgetstr(5, fdRawData); //[dataStart,dataEnd,dataMatch,data]=regexp(strData,'/#EOC#/') //mseek(pos + dataEnd, fdRawData, 'set'); mseek(pos + 5, fdRawData, 'set'); end This way, regexp dosn't have to deal with binary data at all. With best regards Gerhard -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034499.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From gerhard.kreuzer at liftoff.at Fri Aug 26 13:21:32 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 26 Aug 2016 04:21:32 -0700 (MST) Subject: [Scilab-users] Regex problem In-Reply-To: <1472209890445-4034499.post@n3.nabble.com> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> Message-ID: <1472210492702-4034500.post@n3.nabble.com> Hi, ah, found the way to upload a file. Here two samplea and my code. With best regards Gerhard Regex_Problem.zip -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034500.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From antoine.monmayrant at laas.fr Fri Aug 26 15:00:29 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Fri, 26 Aug 2016 15:00:29 +0200 Subject: [Scilab-users] LateX support and verbatim Message-ID: <1b72-57c03d80-2b-37c39980@190899269> Hi all, I tried to use verbatim text inside some latex string, but without success: titlepage("$\verb| \alpha |$") Is this normal? Is "\verb" a TeX and not a LaTeX command? Cheers, Antoine From sgougeon at free.fr Fri Aug 26 17:08:36 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 26 Aug 2016 17:08:36 +0200 Subject: [Scilab-users] LateX support and verbatim In-Reply-To: <1b72-57c03d80-2b-37c39980@190899269> References: <1b72-57c03d80-2b-37c39980@190899269> Message-ID: <57C05B74.5060205@free.fr> Hi Antoine, Le 26/08/2016 15:00, Antoine Monmayrant a ?crit : > Hi all, > > I tried to use verbatim text inside some latex string, but without success: > > titlepage("$\verb| \alpha |$") > > Is this normal? > Is "\verb" a TeX and not a LaTeX command? The previewer shows it in red => not supported. All LaTeX commands are not supported. \mbox{your text} \text{..} are. Samuel From gerhard.kreuzer at liftoff.at Fri Aug 26 17:10:53 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 26 Aug 2016 08:10:53 -0700 (MST) Subject: [Scilab-users] Regex problem In-Reply-To: <1472210492702-4034500.post@n3.nabble.com> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> Message-ID: <1472224253373-4034503.post@n3.nabble.com> Hi, do some testing: The difference between the two fils (test data / real data) is the first byte after the meta data: The first byte of binary data is 0xFA. When I read in 138 characters, regex is working. This means, I read until the '#'. Reading one byte more, which means reading 0xFA also, regex fails. My test data starting with 0x55 after the '#data#', which works. So, the problem is the 0xFA byte. Any idea? Unfortunately the length of the meta data sections varies and isn't known in advance, so I need some method to read metadata, easily finding the start of the binary data. From the Content of the metadata I can calculate the amount of bytes of the binary data, and after that a new block of meta data starts and so on. With best regards Gerhard -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034503.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From j-lan at online.no Fri Aug 26 19:07:42 2016 From: j-lan at online.no (=?UTF-8?Q?Jan_=c3=85ge_Langeland?=) Date: Fri, 26 Aug 2016 19:07:42 +0200 Subject: [Scilab-users] Regex problem In-Reply-To: <1472224253373-4034503.post@n3.nabble.com> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> Message-ID: <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> Gerhard Would this work? Read as much as you need as binary and convert the non ascii values to an ascii value, for instance 0. The below is not optimized, and I have no idea why the strsplit is needed, but I got an "unknown error" without it: fid=mopen(datafile,"rb"); btr=1000; B=mgeti(btr+1,"uc",fid); for i=1:btr+1 if B(i)>128 | B(i)<32 then B(i)=48; end end S=strsplit(ascii(B),btr); strData=S(1); [dataStart,dataEnd,dataMatch,data]=regexp(strData,'/#data#/') ... Jan ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Fri Aug 26 19:12:55 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Fri, 26 Aug 2016 19:12:55 +0200 Subject: [Scilab-users] POWBLK_f displays "a" as exponant instead of real value of UI box Message-ID: <000001d1ffbd$1657f520$4307df60$@wanadoo.fr> Hello, Would it be possible, with POWBLK_f block, in a next version of XCOS, to display the real value programmed in the UI box, instead "a" (u^a), which kills the correct reading of schemas? Sincerely Pierre W10 with Scilab/Xcos x64 5.5.2 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 906 bytes Desc: not available URL: From gerhard.kreuzer at liftoff.at Fri Aug 26 20:38:55 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 26 Aug 2016 11:38:55 -0700 (MST) Subject: [Scilab-users] Regex problem In-Reply-To: <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> Message-ID: <049401d1ffc9$0e036d30$2a0a4790$@liftoff.at> Hi Jan, that is a nice idea, basically. The meta data (= ascii) coming first and after that I have binary data. Now I can read character by character, as you did and stop at the first non ascii character. Now I only have ascii characters in my strData variable and regex should work. And this method automatically adapt itself to any length of meta data, so this also works for me. The length of the binary data block can be calculated from the meta data and this way I found the next starting point for the next meta data block. I immediately start coding ? Thanks With best regards Gerhard Von: JLan [via Scilab / Xcos - Mailing Lists Archives] [mailto:ml-node+s994242n4034504h24 at n3.nabble.com] Gesendet: Freitag, 26. August 2016 19:09 An: Gerhard Kreuzer Betreff: Re: Regex problem Gerhard Would this work? Read as much as you need as binary and convert the non ascii values to an ascii value, for instance 0. The below is not optimized, and I have no idea why the strsplit is needed, but I got an "unknown error" without it: fid=mopen(datafile,"rb"); btr=1000; B=mgeti(btr+1,"uc",fid); for i=1:btr+1 if B(i)>128 | B(i)<32 then B(i)=48; end end S=strsplit(ascii(B),btr); strData=S(1); [dataStart,dataEnd,dataMatch,data]=regexp(strData,'/#data#/') ... Jan ? _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users _____ If you reply to this email, your message will be added to the discussion below: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034504.html To unsubscribe from [Scilab-users] Regex problem, click here . NAML -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034506.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerhard.kreuzer at liftoff.at Sat Aug 27 08:10:47 2016 From: gerhard.kreuzer at liftoff.at (Gerhard Kreuzer) Date: Fri, 26 Aug 2016 23:10:47 -0700 (MST) Subject: [Scilab-users] Regex problem In-Reply-To: <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> Message-ID: <000301d20029$b54765a0$1fd630e0$@liftoff.at> Hi Jan, get it. Yesterday I faild until I see that the file wasn?t accessible, for what reason ever. I don?t get an error message, but after mgetstr I don?t have any data read. After rebooting the machine, this problem dissappears. Here the working version: // Copyright (C) 2016 - Liftoff - Gerhard Kreuzer msc. // // Date of creation: 26.08.2016 // // Just for tests clear; fnRawData='Works.raw'; fnRawData='Fails.raw' // Comment out to see working file which contains only dummy data // HEUREKA, both files working now fdRawData = mopen(fnRawData,'rb'); // Find start of binary data by searching the first non ascii value // No problem if the exact end is missed, regex will do the rest if ~meof(fdRawData) then c = mgeti(1, 'uc', fdRawData); end while ( c < 128 & c >= 32 ) & ~meof(fdRawData) c = mgeti(1, 'uc', fdRawData); end metaDataEnd = mtell(fdRawData) // Note down this position mseek(0, fdRawData, 'set'); // Rewind file // strData = mgetstr(metaDataEnd - 1, fdRawData); // Read whole meta data block, only ASCII values go here [dummy,dataStart,dataMatch,data]=regexp(strData,'/#data#/'); // Analyze meta data, we just seek for the begin of the binary data here mseek(dataStart, fdRawData, 'set'); // Set file pointer to correct position sset = mgeti(7, 'il', fdRawData); // Read first sample set, just for test. mclose(fdRawData); // Ich habe fertig I am sure ther could be done some optimization, but ist a good start now. Thanks a lot. With best regards Gerhard Von: JLan [via Scilab / Xcos - Mailing Lists Archives] [mailto:ml-node+s994242n4034504h24 at n3.nabble.com] Gesendet: Freitag, 26. August 2016 19:09 An: Gerhard Kreuzer Betreff: Re: Regex problem Gerhard Would this work? Read as much as you need as binary and convert the non ascii values to an ascii value, for instance 0. The below is not optimized, and I have no idea why the strsplit is needed, but I got an "unknown error" without it: fid=mopen(datafile,"rb"); btr=1000; B=mgeti(btr+1,"uc",fid); for i=1:btr+1 if B(i)>128 | B(i)<32 then B(i)=48; end end S=strsplit(ascii(B),btr); strData=S(1); [dataStart,dataEnd,dataMatch,data]=regexp(strData,'/#data#/') ... Jan ? _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users _____ If you reply to this email, your message will be added to the discussion below: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034504.html To unsubscribe from [Scilab-users] Regex problem, click here . NAML -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Regex-problem-tp4034446p4034507.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rouxph.22 at gmail.com Sat Aug 27 19:24:46 2016 From: rouxph.22 at gmail.com (philippe) Date: Sat, 27 Aug 2016 19:24:46 +0200 Subject: [Scilab-users] LateX support and verbatim In-Reply-To: <1b72-57c03d80-2b-37c39980@190899269> References: <1b72-57c03d80-2b-37c39980@190899269> Message-ID: Hi, Le 26/08/2016 ? 15:00, Antoine Monmayrant a ?crit : > Hi all, > > I tried to use verbatim text inside some latex string, but without success: > > titlepage("$\verb| \alpha |$") > since text are displayed as "verbatim" by scilab you don't need \verb , you should just write titlepage("\alpha"). Philippe. From cfuttrup at gmail.com Sat Aug 27 20:30:52 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 27 Aug 2016 20:30:52 +0200 Subject: [Scilab-users] Cubic spline In-Reply-To: <99d-57bc4880-5-5876c30@257233534> References: <99d-57bc4880-5-5876c30@257233534> Message-ID: <19f7bc5c-a639-d07a-4442-ada9aff5e0fd@gmail.com> Hi all (I made a new subject) Thank you Antoine for the link to David Goldberg. Not exactly easy reading (and 44 pages of it). I found it interesting in my search for better calculations in Scilab that there are specific ways to handle hypothenuses. I also dug into a text by Michael Baudin about Floating Points in Scilab: forge.scilab.org/index.php/p/docscifloat/downloads/get/floatingpoint_v0.1.pdf (David Goldberg is one of his references) Here the special works of hypothenuses is further supported (page 43-44 onward). I wonder, does Scilab have the hypot function, similar to Matlab? ... Googling gives me no hits for Scilab but a page of hits with Matlab. For example http://blogs.mathworks.com/loren/2008/02/07/why-hypot/ /Claus On 23-08-2016 14:59, Antoine Monmayrant wrote: > Hello Paul, > > We all make the same mistake at some point. > I did it few years ago and someone mentioned this article: "What every computer scientist should know about floating-point arithmetic" by David Goldberg. > It's available online, for example here: http://perso.ens-lyon.fr/jean-michel.muller/goldberg.pdf > > I think it's worth reading it. > > Cheers, > > Antoine > > > Le Mardi, Ao?t 23, 2016 14:43 CEST, "Carrico, Paul" a ?crit: > >> I've had like a newbie .... >> >> Thanks for the lesson :) >> >> EXPORT CONTROL : >> Cet email ne contient pas de donn?es techniques >> This email does not contain technical data >> >> De : users [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon >> Envoy? : mardi 23 ao?t 2016 14:27 >> ? : Users mailing list for Scilab >> Objet : [EXTERNAL] Re: [Scilab-users] Whay False >> >> Hello, >> >> Le 23/08/2016 13:56, Carrico, Paul a ?crit : >> Hi All, >> >> I spent a lot of time in looking for an issue in my code ; finally I found the origin but I do not understand why ... probably a very basic reason :| >> >> Any suggestion regarding the code here after ? >> --> modulo(2.05, 2) - 0.05 >> ans = >> >> -1.804D-16 >> >> This is a classical result in Numerical computing. > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Sun Aug 28 00:00:09 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Sat, 27 Aug 2016 15:00:09 -0700 Subject: [Scilab-users] Constrained optimization speed vs. unconstrained Message-ID: <1472335209.3023.3.camel@Servo> "optim" allows you to submit a constraints vector for the optimization. How much does using constrained optimization affect the optimization speed? I.e., take the wholly hypothetical case where I'm optimizing some function f(x) with binf and bsup specified, and that the optimization never ever hits binf or bsup. Is the constrained optimization slower than the unconstrained optimization? Is there any general way, short of doing the experiment, to know how much slower? Thanks in advance... -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From sgougeon at free.fr Sun Aug 28 06:20:29 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Aug 2016 06:20:29 +0200 Subject: [Scilab-users] Regex problem In-Reply-To: <000301d20029$b54765a0$1fd630e0$@liftoff.at> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> <000301d20029$b54765a0$1fd630e0$@liftoff.at> Message-ID: <57C2668D.4020402@free.fr> Hello, Here is another (fast) implementation. You get directly all the binary blocs of a file in an output list. Cheers Samuel -------------------- function [res, bytes]=getBinaryBlocs(data, startstr, endstr) fid = mopen(data, 'rb') data = mgeti(1e6, 'uc', fid) mclose(fid) bytes = data s = data<32 | data>127 data(s) = ascii(".") [s, e] = regexp(ascii(data), "/"+startstr+".*?"+endstr+"/") res = list() for i = 1:length(s) res(i) = bytes((s(i)+length(ascii(startstr))):(e(i)-length(ascii(endstr)))) end endfunction bb = getBinaryBlocs('Fails.raw', "#data#", "#EOC#"); -------------------- Le 27/08/2016 08:10, Gerhard Kreuzer a ?crit : > > Hi Jan, > > get it. > > Yesterday I faild until I see that the file wasn?t accessible, for > what reason ever. I don?t get an error message, but after mgetstr I > don?t have any data read. After rebooting the machine, this problem > dissappears. > > Here the working version: > > /// Copyright (C) 2016 - Liftoff - Gerhard Kreuzer msc./ > > //// > > /// Date of creation: 26.08.2016/ > > //// > > /// Just for tests/ > > clear; > > fnRawData='Works.raw'; > > fnRawData='Fails.raw'/// Comment out to see working file which > contains only dummy data/ > > /// HEUREKA, both files working now/ > > fdRawData= mopen(fnRawData,'rb'); > > /// Find start of binary data by searching the first non ascii value/ > > /// No problem if the exact end is missed, regex will do the rest/ > > if~meof(fdRawData) then c = mgeti(1, 'uc', fdRawData); end > > while( c < 128 & c >= 32 ) & ~meof(fdRawData) > > c = mgeti(1, 'uc', fdRawData); > > end > > metaDataEnd= mtell(fdRawData) /// Note down this position/ > > mseek(0,fdRawData, 'set'); /// Rewind > file /// > > strData= mgetstr(metaDataEnd - 1, fdRawData); /// Read whole meta data > block, only ASCII values go here/ > > [dummy,dataStart,dataMatch,data]=regexp(strData,'/#data#/');/// > Analyze meta data, we just seek for the begin of the binary data here/ > > mseek(dataStart,fdRawData, 'set'); /// Set file pointer to correct > position/ > > sset= mgeti(7, 'il', fdRawData); /// Read first sample set, just for > test./ > > mclose(fdRawData);/// Ich habe fertig/ > > I am sure ther could be done some optimization, but ist a good start now. > > Thanks a lot. > > With best regards > > Gerhard > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Sun Aug 28 09:46:39 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Sun, 28 Aug 2016 09:46:39 +0200 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBMYXRlWCBzdXBwb3J0IGFu?= =?utf-8?q?d_verbatim?= In-Reply-To: Message-ID: <4390-57c29700-f-92f22b0@135284177> Le Samedi, Ao?t 27, 2016 19:24 CEST, philippe a ?crit: > Hi, > > Le 26/08/2016 ? 15:00, Antoine Monmayrant a ?crit : > > Hi all, > > > > I tried to use verbatim text inside some latex string, but without success: > > > > titlepage("$\verb| \alpha |$") > > > > since text are displayed as "verbatim" by scilab you don't need \verb , > you should just write titlepage("\alpha"). Thanks Philippe, but nope, it does not work that easily. It does for "\alpha", but my real use case is a bit more complicated and calling titlepage directly is a mess. I use titlepage(errormessage) where errormessage is a string array with a lot of starting and trailing " " (white spaces). I need to preserve these white spaces and use a monospace font to preserve the relative alignment between the different lines in the array. Doing this is a bit convolved when using titlepage alone: - add some character at the begining of each line (to prevent titlepage from stripping the white spaces), - call titlepage, - get a handle the the create textbox, - change text justification (middle->lef centered) - change font style (0 for monospace). This is what I use now, but titlepage("$\verb| error message |$") would have been more compact and elegant. Cheers, Antoine > > Philippe. > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From j-lan at online.no Sun Aug 28 13:01:17 2016 From: j-lan at online.no (=?UTF-8?Q?Jan_=c3=85ge_Langeland?=) Date: Sun, 28 Aug 2016 13:01:17 +0200 Subject: [Scilab-users] Regex problem In-Reply-To: <57C2668D.4020402@free.fr> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> <000301d20029$b54765a0$1fd630e0$@liftoff.at> <57C2668D.4020402@free.fr> Message-ID: Very good, a way of using logical operators that I was not aware of. Even this seems to works: data(data<32|data>127)=ascii(".") Thank you also Samuel for fixing the mgeti('l') bug. Both will help me a lot in reading and decoding some large seismic files. Jan ? On 28.08.2016 06:20, Samuel Gougeon wrote: > Hello, > Here is another (fast) implementation. You get directly all the binary > blocs of a file in an output list. > Cheers > Samuel > -------------------- > function [res, bytes]=getBinaryBlocs(data, startstr, endstr) fid = > mopen(data, 'rb') data = mgeti(1e6, 'uc', fid) mclose(fid) bytes = > data s = data<32 | data>127 data(s) = ascii(".") -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sun Aug 28 16:17:00 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 28 Aug 2016 16:17:00 +0200 Subject: [Scilab-users] Number to string with padding of leading blanks by a set of characters In-Reply-To: References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> <000301d20029$b54765a0$1fd630e0$@liftoff.at> <57C2668D.4020402@free.fr> Message-ID: <57C2F25C.6070604@hslmg.de> Hello, I try to transform the number colum N containing integer elements from 1 to 999, e. g. N=[1;11;111] into T=["  1";" 11";"111"]. I tried with commands like justify, repmat, string, size, length - but without success. Do I miss one or more better adequate command(s)? Kind regards Jens From sdr at durietz.se Sun Aug 28 16:30:53 2016 From: sdr at durietz.se (Stefan Du Rietz) Date: Sun, 28 Aug 2016 16:30:53 +0200 Subject: [Scilab-users] Number to string with padding of leading blanks by a set of characters In-Reply-To: <57C2F25C.6070604@hslmg.de> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> <000301d20029$b54765a0$1fd630e0$@liftoff.at> <57C2668D.4020402@free.fr> <57C2F25C.6070604@hslmg.de> Message-ID: <2d57013e-6990-3424-ddf9-427f261e671a@durietz.se> Hello Jens, T = msprintf("%3i\n", N) Regards Stefan On 2016-08-28 16:17, Jens Simon Strom wrote: > Hello, > I try to transform the number colum N containing integer elements > from 1 to 999, e. g. > > N=[1;11;111] > > into > > T=["  1";" 11";"111"]. > > I tried with commands like justify, repmat, string, size, length - but > without success. Do I miss one or more better adequate command(s)? > > Kind regards > Jens > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > From sgougeon at free.fr Sun Aug 28 16:32:21 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Aug 2016 16:32:21 +0200 Subject: [Scilab-users] Number to string with padding of leading blanks by a set of characters In-Reply-To: <57C2F25C.6070604@hslmg.de> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> <000301d20029$b54765a0$1fd630e0$@liftoff.at> <57C2668D.4020402@free.fr> <57C2F25C.6070604@hslmg.de> Message-ID: <57C2F5F5.7070505@free.fr> Le 28/08/2016 16:17, Jens Simon Strom a ?crit : > Hello, > I try to transform the number colum N containing integer elements > from 1 to 999, e. g. > > N=[1;11;111] > > into > > T=["  1";" 11";"111"]. > > I tried with commands like justify, repmat, string, size, length - but > without success. Do I miss one or more better adequate command(s)? Like this? : --> strsubst(justify(string(N),"r")," "," ") ans = !  1 ! ! ! ! 11 ! ! ! !111 ! From j.s.strom at hslmg.de Sun Aug 28 20:43:59 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 28 Aug 2016 20:43:59 +0200 Subject: [Scilab-users] Number to string with padding of leading blanks by a set of characters In-Reply-To: <57C2F5F5.7070505@free.fr> References: <072801d1fa0c$922bca70$b6835f50$@liftoff.at> <57B723BA.9050302@free.fr> <1472209890445-4034499.post@n3.nabble.com> <1472210492702-4034500.post@n3.nabble.com> <1472224253373-4034503.post@n3.nabble.com> <03a7f727-c8fa-d3f8-8be7-4352d4570068@online.no> <000301d20029$b54765a0$1fd630e0$@liftoff.at> <57C2668D.4020402@free.fr> <57C2F25C.6070604@hslmg.de> <57C2F5F5.7070505@free.fr> Message-ID: <57C330EF.8070708@hslmg.de> Am 28.08.2016 16:32, schrieb Samuel Gougeon: > Le 28/08/2016 16:17, Jens Simon Strom a ?crit : >> Hello, >> I try to transform the number colum N containing integer elements >> from 1 to 999, e. g. >> >> N=[1;11;111] >> >> into >> >> T=["  1";" 11";"111"]. >> >> I tried with commands like justify, repmat, string, size, length - >> but without success. Do I miss one or more better adequate command(s)? > Like this? : > --> strsubst(justify(string(N),"r")," "," ") > ans = > > !  1 ! > ! ! > ! 11 ! > ! ! > !111 ! > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > Bonsoir Samuel, This is exactly what I need. Solved! Thanks a lot Jens From rsherry8 at comcast.net Sun Aug 28 22:03:33 2016 From: rsherry8 at comcast.net (Robert Sherry) Date: Sun, 28 Aug 2016 16:03:33 -0400 Subject: [Scilab-users] Using the Function fsolve Message-ID: <4a491463-618d-a1e4-4570-0d4ea4fcd8e3@comcast.net> I defined the following two functions: function [z]=f(x,y) z = x + y - 8 endfunction function [z]=g(x,y) z = 2*x + y - 8 endfunction I then wanted to find the roots of the two functions (equations). That is, I want a pair of numbers (a,b) such that f(a,b) = g(a,b) = 0. So, I found the function fsolve in the documentation of Scilab which I believe will do what I want. So, I ran the following command: fsolve([0;0],f,g) and it produced the following error: Undefined variable: y at line 2 of function f called by : fsolve([0;0],f,g) I do not understand this error and I am hoping that somebody can tell me what I am doing wrong. Bob -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Aug 28 22:31:48 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Aug 2016 22:31:48 +0200 Subject: [Scilab-users] Using the Function fsolve In-Reply-To: <4a491463-618d-a1e4-4570-0d4ea4fcd8e3@comcast.net> References: <4a491463-618d-a1e4-4570-0d4ea4fcd8e3@comcast.net> Message-ID: <57C34A34.2030801@free.fr> Le 28/08/2016 22:03, Robert Sherry a ?crit : > I defined the following two functions: > > function [z]=f(x,y) > z = x + y - 8 > endfunction > > function [z]=g(x,y) > z = 2*x + y - 8 > endfunction > > I then wanted to find the roots of the two functions (equations). That > is, I want a pair of numbers (a,b) > such that f(a,b) = g(a,b) = 0. So, I found the function fsolve in the > documentation of Scilab which I believe will do what I want. So, I ran > the following command: > fsolve([0;0],f,g) > and it produced the following error: > Undefined variable: y > at line 2 of function f called by : > fsolve([0;0],f,g) > I do not understand this error and I am hoping that somebody can tell > me what I am doing wrong. You problem is linear. So there are simpler solutions than fsolve() that is useful for systems of non-linear equations. Your system is equivalent to the matrix equation [1 1 ; 2 1]*X = [ 8 ; 8] with X = [x ; y] Let set A = [1 1 ; 2 1] ; // and b = [ 8 ; 8]; // from A*X = b, we get X with X = A\b --> X = A\b X = 0. 8. that means { x=0, y=8 } Regards Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From rsherry8 at comcast.net Sun Aug 28 22:48:59 2016 From: rsherry8 at comcast.net (Robert Sherry) Date: Sun, 28 Aug 2016 16:48:59 -0400 Subject: [Scilab-users] Using the Function fsolve In-Reply-To: <57C34A34.2030801@free.fr> References: <4a491463-618d-a1e4-4570-0d4ea4fcd8e3@comcast.net> <57C34A34.2030801@free.fr> Message-ID: <15e29e54-d879-60aa-a383-42403f14b58a@comcast.net> Samuel, Thanks for the response. While the example, I showed is linear, the equations I want to solve are not. I am thinking I need a third function which returns a vector. Am I on the right track? Bob On 8/28/2016 4:31 PM, Samuel Gougeon wrote: > Le 28/08/2016 22:03, Robert Sherry a ?crit : >> I defined the following two functions: >> >> function [z]=f(x,y) >> z = x + y - 8 >> endfunction >> >> function [z]=g(x,y) >> z = 2*x + y - 8 >> endfunction >> >> I then wanted to find the roots of the two functions (equations). >> That is, I want a pair of numbers (a,b) >> such that f(a,b) = g(a,b) = 0. So, I found the function fsolve in the >> documentation of Scilab which I believe will do what I want. So, I >> ran the following command: >> fsolve([0;0],f,g) >> and it produced the following error: >> Undefined variable: y >> at line 2 of function f called by : >> fsolve([0;0],f,g) >> I do not understand this error and I am hoping that somebody can tell >> me what I am doing wrong. > > You problem is linear. So there are simpler solutions than fsolve() > that is useful for systems of non-linear equations. > Your system is equivalent to the matrix equation > [1 1 ; 2 1]*X = [ 8 ; 8] with X = [x ; y] > Let set > A = [1 1 ; 2 1] ; > // and > b = [ 8 ; 8]; > // from A*X = b, we get X with > X = A\b > --> X = A\b > X = > 0. > 8. > that means { x=0, y=8 } > > 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 Sun Aug 28 23:04:55 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Aug 2016 23:04:55 +0200 Subject: [Scilab-users] Using the Function fsolve In-Reply-To: <15e29e54-d879-60aa-a383-42403f14b58a@comcast.net> References: <4a491463-618d-a1e4-4570-0d4ea4fcd8e3@comcast.net> <57C34A34.2030801@free.fr> <15e29e54-d879-60aa-a383-42403f14b58a@comcast.net> Message-ID: <57C351F7.6010503@free.fr> Le 28/08/2016 22:48, Robert Sherry a ?crit : > Samuel, > > Thanks for the response. While the example, I showed is linear, the > equations I want to solve are not. I am thinking I need a third > function which returns a vector. Am I on the right track? . Then it would have been great to post a non-linear sample with sin(x), etc ;) Only one function -- but vectorized -- is required. Here is an example (non-linear :): function Z = f(u) x = u(1) y = u(2) Z = [ sin(x)-y+3 cos(y)+x-2 ] endfunction s = fsolve([0 0]',f) [ sin(s(1))-s(2)+3 cos(s(2))+s(1)-2] // Check --> function Z = f(u) > x = u(1) > y = u(2) > Z = [ sin(x)-y+3 > cos(y)+x-2 > ] > endfunction --> s = fsolve([0 0]',f) s = 2.9999999 3.1411201 --> [ sin(s(1))-s(2)+3 cos(s(2))+s(1)-2] // Check ans = 4.441D-16 -1.332D-15 // Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Aug 28 23:06:26 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 28 Aug 2016 23:06:26 +0200 Subject: [Scilab-users] Newbie Question: Dynamic Programming/Sequence Alignment Algorithms In-Reply-To: References: Message-ID: <57C35252.2040407@free.fr> Hello, Le 24/07/2016 14:30, Dragonmaw a ?crit : > Hello there, > > i need to align (unequally long) time series, computing their minimal > euclidean distance alignment. I believe this is being done optimally > with dynamic programming. Algorithms exist from biocomputing or speech > recognition, but the packages i've found only provide functions > applicable to either biosequences or sound files. Since i'm interested > in my numerical time series only, those packages don't solve my > problem, which is more general. I lack the Scilab expertise to adapt > the Algorithms for my case, therefore i'd need some help finding a > package that does exactly that. Perhaps one of you knows such a package. > Thank you very much, > Victor K . It depends on * Quantization of values: o is there a finite set of possible discrete values + not orderable (like in genomics: A C G U) ? + orderable (ex: 1 3 7 -10) o or is the series about a continuous variable? * Are the sampling rates the same for both series? If it is not the case, do you know the stretching factor between both, or you don't? ... If your problem is more general, i am afraid that more general and basic informations are needed about it. Regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Aug 29 00:05:22 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 29 Aug 2016 00:05:22 +0200 Subject: [Scilab-users] How to print int64 or uint64 integers at full accuracy? Message-ID: <57C36022.2070200@free.fr> Hello all, I am wondering how it is possible to print (in a file, in a string) new 64 bit integers, at full accuracy. Their relative accuracy is better than for decimal numbers (1/2^63 instead of %eps=1/2^52). In Scilab 5, digits lower than 1/%eps -- that are somewhat randomly set -- can be displayed but are not relevant: -->format(24) -->%pi %pi = 3.141592653589793115998 -->(%pi-3.141592653589793)==0 ans = T In Scilab 6, digits beyond %eps are displayed as 0. This is great: --> format(24) --> %pi %pi = 3.141592653589793100000 However, this change is applied to all numbers, even to integers. The issue is that Scilab 6 also brings super-integers :) int64 / uint64 having 64-bit mantissae, instead of 53-bit mantissae for decimal numbers. Hence, int64 have a relative accuracy better than %eps. Unfortunately the related digits can't be printed. Only the default display in console works. Examples: i = int64(2)^62 + 1 printf("%d %i %ld %li \n", i, i ,i, i) format(22) string(i) // I found this undocumented trick with printf format, but there is the same truncature: printf("%20.0f\n", i) // Results: --> i = int64(2)^62 + 1 i = 4611686018427387905 // The right value! --> printf("%d %i %ld %li \n", i, i ,i, i) -2147483648 -2147483648 -2147483648 -2147483648 // Oups. %lld does nor work --> format(22) --> string(i) ans = 4611686018427387900 // bad trailing zeros --> // I found this undocumented trick with printf format, but there is the same truncature: --> printf("%20.0f\n", i) 4611686018427387900 // Same issue (final 5 missing) I started looking for a solution with write() and its fortran formating, but it looks no more ready for int64 integers. Would you know any solution? Thanks Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Mon Aug 29 02:09:21 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Sun, 28 Aug 2016 17:09:21 -0700 Subject: [Scilab-users] How to print int64 or uint64 integers at full accuracy? In-Reply-To: <57C36022.2070200@free.fr> References: <57C36022.2070200@free.fr> Message-ID: <1472429361.3023.62.camel@Servo> A kludge would be to make it into two integers. This works for positive integers, but verifying (or modifying) the algorithm to signed numbers is left as an exercise to the reader: A = (some 64-bit constant) A_1 = A / 1000000000; A_0 = A - A_1 * 1000000000; if (A_1 == 0) mprintf("A = %d\n", A); else mprintf("A = %d%09d\n", A_1, A_0); end // if Woo hoo! Eight lines and an if statement where you wanted something embedded in mprintf. What could be better? On Mon, 2016-08-29 at 00:05 +0200, Samuel Gougeon wrote: > Hello all, > > I am wondering how it is possible to print (in a file, in a string) > new 64 bit integers, > at full accuracy. Their relative accuracy is better than for decimal > numbers > (1/2^63 instead of %eps=1/2^52). > > In Scilab 5, digits lower than 1/%eps -- that are somewhat randomly > set -- > can be displayed but are not relevant: > -->format(24) > -->%pi > %pi = > 3.141592653589793115998 > > -->(%pi-3.141592653589793)==0 > ans = > T > > In Scilab 6, digits beyond %eps are displayed as 0. This is great: > --> format(24) > --> %pi > %pi = > 3.141592653589793100000 > > However, this change is applied to all numbers, even to integers. > The issue is that Scilab 6 also brings super-integers :) int64 / > uint64 > having 64-bit mantissae, instead of 53-bit mantissae for decimal > numbers. > Hence, int64 have a relative accuracy better than %eps. > Unfortunately the related digits can't be printed. > Only the default display in console works. > Examples: > i = int64(2)^62 + 1 > printf("%d %i %ld %li \n", i, i ,i, i) > format(22) > string(i) > // I found this undocumented trick with printf format, but there is > the same truncature: > printf("%20.0f\n", i) > > // Results: > --> i = int64(2)^62 + 1 > i = > 4611686018427387905 // The right value! > > --> printf("%d %i %ld %li \n", i, i ,i, i) > -2147483648 -2147483648 -2147483648 -2147483648 // Oups. %lld > does nor work > > --> format(22) > --> string(i) > ans = > 4611686018427387900 // bad trailing zeros > > --> // I found this undocumented trick with printf format, but there > is the same truncature: > --> printf("%20.0f\n", i) > 4611686018427387900 // Same issue (final 5 missing) > > > I started looking for a solution with write() and its fortran > formating, > but it looks no more ready for int64 integers. > > Would you know any solution? > > Thanks > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From sgougeon at free.fr Mon Aug 29 02:46:27 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 29 Aug 2016 02:46:27 +0200 Subject: [Scilab-users] How to print int64 or uint64 integers at full accuracy? In-Reply-To: <1472429361.3023.62.camel@Servo> References: <57C36022.2070200@free.fr> <1472429361.3023.62.camel@Servo> Message-ID: <57C385E3.3000904@free.fr> In the SCI/modules/string/sci_gateway/cpp/sci_string.cpp source file, is defined types::Function::ReturnValue *intString*(T* pInt, types::typed_list &out) { int iDims = pInt->getDims(); int* piDimsArray = pInt->getDimsArray(); types::String *pstOutput = new types::String(iDims, piDimsArray); int iSize = pInt->getSize(); for (int i = 0 ; i < iSize ; i++) { std::wostringstream ostr; DoubleComplexMatrix2String(&ostr, *(double)*pInt->get(i), 0); pstOutput->set(i, ostr.str().c_str()); } where integers are converted into decimal before being sent to DoubleComplexMatrix2String() to be formated as a decimal. There are at least 3 different algos to do the same thing (i guess not only for integers)...: - the disp() one (that is OK for integers) - the string() one (NOK) - the printf() one (NOK) - and may be other ones... Le 29/08/2016 02:09, Tim Wescott a ?crit : > A kludge would be to make it into two integers. This works for positive > integers, but verifying (or modifying) the algorithm to signed numbers > is left as an exercise to the reader: > > A = (some 64-bit constant) > A_1 = A / 1000000000; > A_0 = A - A_1 * 1000000000; > > if (A_1 == 0) > mprintf("A = %d\n", A); > else > mprintf("A = %d%09d\n", A_1, A_0); > end // if > > Woo hoo! Eight lines and an if statement where you wanted something > embedded in mprintf. What could be better? > > On Mon, 2016-08-29 at 00:05 +0200, Samuel Gougeon wrote: >> Hello all, >> >> I am wondering how it is possible to print (in a file, in a string) >> new 64 bit integers, >> at full accuracy. Their relative accuracy is better than for decimal >> numbers >> (1/2^63 instead of %eps=1/2^52). >> >> In Scilab 5, digits lower than 1/%eps -- that are somewhat randomly >> set -- >> can be displayed but are not relevant: >> -->format(24) >> -->%pi >> %pi = >> 3.141592653589793115998 >> >> -->(%pi-3.141592653589793)==0 >> ans = >> T >> >> In Scilab 6, digits beyond %eps are displayed as 0. This is great: >> --> format(24) >> --> %pi >> %pi = >> 3.141592653589793100000 >> >> However, this change is applied to all numbers, even to integers. >> The issue is that Scilab 6 also brings super-integers :) int64 / >> uint64 >> having 64-bit mantissae, instead of 53-bit mantissae for decimal >> numbers. >> Hence, int64 have a relative accuracy better than %eps. >> Unfortunately the related digits can't be printed. >> Only the default display in console works. >> Examples: >> i = int64(2)^62 + 1 >> printf("%d %i %ld %li \n", i, i ,i, i) >> format(22) >> string(i) >> // I found this undocumented trick with printf format, but there is >> the same truncature: >> printf("%20.0f\n", i) >> >> // Results: >> --> i = int64(2)^62 + 1 >> i = >> 4611686018427387905 // The right value! >> >> --> printf("%d %i %ld %li \n", i, i ,i, i) >> -2147483648 -2147483648 -2147483648 -2147483648 // Oups. %lld >> does nor work >> >> --> format(22) >> --> string(i) >> ans = >> 4611686018427387900 // bad trailing zeros >> >> --> // I found this undocumented trick with printf format, but there >> is the same truncature: >> --> printf("%20.0f\n", i) >> 4611686018427387900 // Same issue (final 5 missing) >> >> >> I started looking for a solution with write() and its fortran >> formating, >> but it looks no more ready for int64 integers. >> >> Would you know any solution? >> >> 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 j-lan at online.no Mon Aug 29 09:46:39 2016 From: j-lan at online.no (=?UTF-8?Q?Jan_=c3=85ge_Langeland?=) Date: Mon, 29 Aug 2016 09:46:39 +0200 Subject: [Scilab-users] How to print int64 or uint64 integers at full accuracy? In-Reply-To: <1472429361.3023.62.camel@Servo> References: <57C36022.2070200@free.fr> <1472429361.3023.62.camel@Servo> Message-ID: <321bf67f-b693-cede-d03d-a99a8213eefb@online.no> On 29.08.2016 02:09, Tim Wescott wrote: > A kludge would be to make it into two integers. Each case may not be so complex to work around, but in total it seems like Scilab 6 is not yet well prepared for int64 and uint64. For instance %x and %o need to be handled too, functions like dec2bin() and dec2hex() should work - etc. Generally a lot of caution is needed when using these 64 bit integers. Example: --> int64(2^62+256+1) //loss of prescision ans = 4611686018427387904 --> int64(2^62)+256+1 //correct ans = 4611686018427388161 --> int64(2)^62+256+1 // correct ans = 4611686018427388161 Jan ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon Aug 29 10:32:02 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 29 Aug 2016 10:32:02 +0200 Subject: [Scilab-users] How to print int64 or uint64 integers at full accuracy? In-Reply-To: <321bf67f-b693-cede-d03d-a99a8213eefb@online.no> References: <57C36022.2070200@free.fr> <1472429361.3023.62.camel@Servo> <321bf67f-b693-cede-d03d-a99a8213eefb@online.no> Message-ID: <57C3F302.3000601@free.fr> Le 29/08/2016 09:46, Jan ?ge Langeland a ?crit : > On 29.08.2016 02:09, Tim Wescott wrote: >> A kludge would be to make it into two integers. > > Each case may not be so complex to work around, but in total it seems > like Scilab 6 is not yet well prepared for int64 and uint64. > > For instance %x and %o need to be handled too, functions like > dec2bin() and dec2hex() should work - etc. > > Generally a lot of caution is needed when using these 64 bit > integers. Example: > --> int64(2^62+256+1) //loss of prescision > ans = > 4611686018427387904 Yes, but this loss is expected, since 2^62+256+1 is performed with decimal encoding. It is a case similar to the classical 1+ %eps/2 It is not a bug. For dec2*(): int64 encoding is already supported, and a clear error message is yielded for input integers > 2^52 --> dec2bin(int64(2^52)) ans = 10000000000000000000000000000000000000000000000000000 --> dec2bin(int64(2^53)) at line 12 of function dec2bin ( SCI\modules\elementary_functions\macros\dec2bin.sci line 43 ) dec2base: Wrong value for input argument #1: Must be between 0 and 2^52. So, there is still a limitation, but it is clearly stated. At least, integers from 2^33 to 2^52 are newly supported :) Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Aug 29 12:37:20 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 29 Aug 2016 10:37:20 +0000 Subject: [Scilab-users] How to print int64 or uint64 integers at full accuracy? References: <57C36022.2070200@free.fr> <1472429361.3023.62.camel@Servo> <321bf67f-b693-cede-d03d-a99a8213eefb@online.no> <57C3F302.3000601@free.fr> Message-ID: (sorry, please consider corrected code below and discard previous) From: Rafael Guerra Sent: Monday, August 29, 2016 12:34 PM To: Users mailing list for Scilab Subject: RE: [Scilab-users] How to print int64 or uint64 integers at full accuracy? Hello, I have tried Tim's nice kludge but with no success. A different attempt using "modulo" failed too: i = int64(2)^62 + 1; s = ""; j = i; b = int64(10); while (j >= 1) dj = modulo(j,b); s = s + string(dj); j = j/b; end s = strrev(s); printf("64-bit integer - string: %s\n", s) printf("64-bit integer - true: 4611686018427387905\n") It is indeed puzzling and troublesome that a number can be correctly output to Scilab's console but not to a string or a file... Cheers, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Aug 29 12:34:32 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 29 Aug 2016 10:34:32 +0000 Subject: [Scilab-users] How to print int64 or uint64 integers at full accuracy? In-Reply-To: <57C3F302.3000601@free.fr> References: <57C36022.2070200@free.fr> <1472429361.3023.62.camel@Servo> <321bf67f-b693-cede-d03d-a99a8213eefb@online.no> <57C3F302.3000601@free.fr> Message-ID: Hello, I have tried Tim's nice kludge but with no success. A different attempt using "modulo" failed too: i = int64(2)^62 + 1; s = ""; j = i; b = int64(10); while (j >= 1) dj = int(modulo(j,b)); s = s + string(dj); j = j/b; end s = strrev(s); printf("64-bit integer - string: %s\n", s) printf("64-bit integer - true: 4611686018427387905\n") It is indeed puzzling and troublesome that a number can be correctly output to Scilab's console but not to a string or a file... Cheers, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From j-lan at online.no Mon Aug 29 14:46:25 2016 From: j-lan at online.no (=?ISO-8859-1?Q?Jan-=C5ge_Langeland_=28p=29?=) Date: Mon, 29 Aug 2016 14:46:25 +0200 Subject: [Scilab-users] How to print int64 or uint64 integers at full accuracy? Message-ID: Yes in terms of ratio that is a huge improvement :) , but having functions that fail when a number reach a certain size is a ticking bomb, for instance if you use them for timetagging.? I agree also that the 2^62+256+1 is not directly a bug, but it may not be obvious everyone that a sum of integers shall be calulated via float aritmetics.? Jan ?? -------- Original message -------- From: Samuel Gougeon < Yes, but this loss is expected, since 2^62+256+1 is performed with decimal encoding. It is a case similar to the classical 1+ %eps/2 It is not a bug. For dec2*(): int64 encoding is already supported, and a clear error message is yielded for input integers > 2^52 --> dec2bin(int64(2^52)) ?ans? = ?10000000000000000000000000000000000000000000000000000 --> dec2bin(int64(2^53)) at line??? 12 of function dec2bin ( SCI\modules\elementary_functions\macros\dec2bin.sci line 43 ) dec2base: Wrong value for input argument #1: Must be between 0 and 2^52. So, there is still a limitation, but it is clearly stated. At least, integers from 2^33 to 2^52 are newly supported :) ? Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Mon Aug 29 18:39:39 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Mon, 29 Aug 2016 18:39:39 +0200 Subject: [Scilab-users] hypot Message-ID: <44a077f4-6d92-b552-fee2-1abca77ec550@gmail.com> Hi all In a text by Michael Baudin about Floating Points in Scilab: forge.scilab.org/index.php/p/docscifloat/downloads/get/floatingpoint_v0.1.pdf (David Goldberg is one of his references) Here the special works of hypothenuses is further supported (page 43-44 onward). I wonder, does Scilab have the hypot function, similar to Matlab? ... Googling gives me no hits for Scilab but a page of hits with Matlab. For example http://blogs.mathworks.com/loren/2008/02/07/why-hypot/ P.S. Sorry for previously posting this question with a different subject. Stray thoughts were later modified but the subject line didn't have my attention. /Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Mon Aug 29 18:43:55 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 29 Aug 2016 16:43:55 +0000 Subject: [Scilab-users] hypot In-Reply-To: <44a077f4-6d92-b552-fee2-1abca77ec550@gmail.com> References: <44a077f4-6d92-b552-fee2-1abca77ec550@gmail.com> Message-ID: Hi, If I am not mistaken, that seems to be what Scilab vector ?norm? does. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Claus Futtrup Sent: Monday, August 29, 2016 6:40 PM To: International users mailing list for Scilab. Subject: [Scilab-users] hypot Hi all In a text by Michael Baudin about Floating Points in Scilab: forge.scilab.org/index.php/p/docscifloat/downloads/get/floatingpoint_v0.1.pdf (David Goldberg is one of his references) Here the special works of hypothenuses is further supported (page 43-44 onward). I wonder, does Scilab have the hypot function, similar to Matlab? ... Googling gives me no hits for Scilab but a page of hits with Matlab. For example http://blogs.mathworks.com/loren/2008/02/07/why-hypot/ P.S. Sorry for previously posting this question with a different subject. Stray thoughts were later modified but the subject line didn't have my attention. /Claus -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Aug 30 14:11:47 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 30 Aug 2016 14:11:47 +0200 Subject: [Scilab-users] titlepage() <= LateX support and verbatim In-Reply-To: <4390-57c29700-f-92f22b0@135284177> References: <4390-57c29700-f-92f22b0@135284177> Message-ID: <57C57803.6020805@free.fr> Hi Antoine, Le 28/08/2016 09:46, Antoine Monmayrant a ?crit : > Le Samedi, Ao?t 27, 2016 19:24 CEST, philippe a ?crit: > ../.. > Thanks Philippe, but nope, it does not work that easily. > It does for "\alpha", but my real use case is a bit more complicated and calling titlepage directly is a mess. > I use titlepage(errormessage) where errormessage is a string array with a lot of starting and trailing " " (white spaces). > I need to preserve these white spaces and use a monospace font to preserve the relative alignment between the different lines in the array. > Doing this is a bit convolved when using titlepage alone: > - add some character at the begining of each line (to prevent titlepage from stripping the white spaces), > - call titlepage, > - get a handle the the create textbox, > - change text justification (middle->lef centered) > - change font style (0 for monospace). > > This is what I use now, but titlepage("$\verb| error message |$") would have been more compact and elegant. . I definitely agree on the fact that xstring() (and xstringb(), called by titlepage(), and that are the guilty guys) always trimming all leading spaces is an issue. It should be the user's responsability to use stripblanks() whenever it is required before feeding xstring(), and that xstring() does not always do that in an irreversible way (text stored in xstring.text is actually deblanked). Presently, the text.alignment property can be either "left", "center" and "right", the default being "left". IMO, a new *"as_is"* or *"none"* value should be added, and even become the default. For the time being, you may test and use the attached version of titlepage: As soon as at least one of the strings has a leading space, the whole matrix of strings is displayed "as is", in order to preserve any indentations and so. To do so, strings are displayed in LaTeX mode. Run --> head_comments titlepage // to get details, or see the header in the script. This workaround has 2 drawbacks: * lines are more compact (IMO too compact). I did not find any way to tune this in supported LaTeX. * The font style must be set when calling titlepage(). It can't be changed with text.font_style, and must be chosen when calling titlepage(). And only 3 fonts are available. But the text.font_foreground attribute works! Example: t = ["Here are indented nested lists" " a) First point" " * First item" " * Second item" " b) Another view" " c) For a new titlepage()?" ] clf subplot(2,2,1) titlepage(t) xtitle("Default titlepage(t)") subplot(2,2,2) // exec() the new titlepage.sci titlepage(t) subplot(2,2,3) titlepage([t ; "" ; t]) head_comments titlepage subplot(2,2,4) titlepage(t,0) e = gce(); e.font_foreground = color("blue"); clear titlepage // comes back to the default titlepage() *Results*: This can be proposed as is to upgrade the present titlepage(), even if it would be better to implement ASAP an "as_is" value for xstring.alignment. Cheers Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: heceeafg.png Type: image/png Size: 33930 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: titlepage.sci Type: text/x-matlab Size: 4508 bytes Desc: not available URL: From Serge.Steer at inria.fr Tue Aug 30 14:23:34 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 30 Aug 2016 14:23:34 +0200 Subject: [Scilab-users] hypot In-Reply-To: References: <44a077f4-6d92-b552-fee2-1abca77ec550@gmail.com> Message-ID: Le 29/08/2016 ? 18:43, Rafael Guerra a ?crit : > > Hi, > > If I am not mistaken, that seems to be what Scilab vector ?norm? does. > You are right. Serge Steer, INRIA > > Regards, > > Rafael > > *From:*users [mailto:users-bounces at lists.scilab.org] *On Behalf Of > *Claus Futtrup > *Sent:* Monday, August 29, 2016 6:40 PM > *To:* International users mailing list for Scilab. > > *Subject:* [Scilab-users] hypot > > Hi all > > In a text by Michael Baudin about Floating Points in Scilab: > forge.scilab.org/index.php/p/docscifloat/downloads/get/floatingpoint_v0.1.pdf > (David Goldberg is one of his references) > > Here the special works of hypothenuses is further supported (page > 43-44 onward). > > I wonder, does Scilab have the hypot function, similar to Matlab? ... > Googling gives me no hits for Scilab but a page of hits with Matlab. > For example http://blogs.mathworks.com/loren/2008/02/07/why-hypot/ > > > P.S. Sorry for previously posting this question with a different > subject. Stray thoughts were later modified but the subject line > didn't have my attention. > > > /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 jasper at amsterchem.com Tue Aug 30 14:30:56 2016 From: jasper at amsterchem.com (jasper van baten) Date: Tue, 30 Aug 2016 14:30:56 +0200 Subject: [Scilab-users] titlepage() <= LateX support and verbatim In-Reply-To: <57C57803.6020805@free.fr> References: <4390-57c29700-f-92f22b0@135284177> <57C57803.6020805@free.fr> Message-ID: Hi Samuel, Perhaps attaching scilab scripts to mail is not a good idea. In combination with the file extension association and the 'host' command this is prone to misuse. Best wishes, Jasper. On 8/30/2016 14:11, Samuel Gougeon wrote: > Hi Antoine, > > Le 28/08/2016 09:46, Antoine Monmayrant a ?crit : >> Le Samedi, Ao?t 27, 2016 19:24 CEST, philippe a ?crit: >> ../.. >> Thanks Philippe, but nope, it does not work that easily. >> It does for "\alpha", but my real use case is a bit more complicated and calling titlepage directly is a mess. >> I use titlepage(errormessage) where errormessage is a string array with a lot of starting and trailing " " (white spaces). >> I need to preserve these white spaces and use a monospace font to preserve the relative alignment between the different lines in the array. >> Doing this is a bit convolved when using titlepage alone: >> - add some character at the begining of each line (to prevent titlepage from stripping the white spaces), >> - call titlepage, >> - get a handle the the create textbox, >> - change text justification (middle->lef centered) >> - change font style (0 for monospace). >> >> This is what I use now, but titlepage("$\verb| error message |$") would have been more compact and elegant. > . > I definitely agree on the fact that xstring() (and xstringb(), called > by titlepage(), > and that are the guilty guys) always trimming all leading spaces is an > issue. > > It should be the user's responsability to use stripblanks() whenever > it is required > before feeding xstring(), and that xstring() does not always do that in an > irreversible way (text stored in xstring.text is actually deblanked). > > Presently, the text.alignment property can be either "left", "center" > and "right", > the default being "left". > IMO, a new *"as_is"* or *"none"* value should be added, and even > become the default. > > For the time being, you may test and use the attached version of > titlepage: > As soon as at least one of the strings has a leading space, the whole > matrix > of strings is displayed "as is", in order to preserve any indentations > and so. > To do so, strings are displayed in LaTeX mode. Run > --> head_comments titlepage // to get details, or see the header in > the script. > > This workaround has 2 drawbacks: > * lines are more compact (IMO too compact). I did not find any way to > tune this in supported LaTeX. > * The font style must be set when calling titlepage(). It can't be > changed with text.font_style, > and must be chosen when calling titlepage(). And only 3 fonts are > available. > But the text.font_foreground attribute works! > > Example: > t = ["Here are indented nested lists" > " a) First point" > " * First item" > " * Second item" > " b) Another view" > " c) For a new titlepage()?" > ] > clf > subplot(2,2,1) > titlepage(t) > xtitle("Default titlepage(t)") > subplot(2,2,2) > // exec() the new titlepage.sci > titlepage(t) > subplot(2,2,3) > titlepage([t ; "" ; t]) > head_comments titlepage > subplot(2,2,4) > titlepage(t,0) > e = gce(); > e.font_foreground = color("blue"); > clear titlepage // comes back to the default titlepage() > > *Results*: > > > This can be proposed as is to upgrade the present titlepage(), > even if it would be better to implement ASAP an "as_is" value for > xstring.alignment. > > Cheers > Samuel > > > > _______________________________________________ > 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: not available Type: image/png Size: 33930 bytes Desc: not available URL: From sgougeon at free.fr Tue Aug 30 14:43:33 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 30 Aug 2016 14:43:33 +0200 Subject: [Scilab-users] titlepage() <= LateX support and verbatim In-Reply-To: <57C57803.6020805@free.fr> References: <4390-57c29700-f-92f22b0@135284177> <57C57803.6020805@free.fr> Message-ID: <57C57F75.9070000@free.fr> Le 30/08/2016 14:11, Samuel Gougeon a ?crit : > .../... > > This can be proposed as is to upgrade the present titlepage(), > even if it would be better to implement ASAP an "as_is" value for > xstring.alignment. Another advantage of this version is that it takes into account void or blank lines set in the matrix of texts, whereas the default version removes all of them (it likely assumes that the user that has set them does not really know what he/she does. Poor user :) SG -------------- next part -------------- An HTML attachment was scrubbed... URL: From matiasb at gmail.com Wed Aug 31 17:11:54 2016 From: matiasb at gmail.com (Matiasb) Date: Wed, 31 Aug 2016 08:11:54 -0700 (MST) Subject: [Scilab-users] Trying to use call_scilab Message-ID: <1472656314464-4034541.post@n3.nabble.com> Hi all, I am developing a simulation engine in C++ which I would like to interact with Scilab. So, I wanted to try the call_scilab API (https://help.scilab.org/docs/6.0.0/en_US/section_204636e951f595409bc6782bb8e1d2d9.html). I faced some issues compiling which are now solved (I hope properly), and now that i finally make the program compile it results in the application hanging indefinitely because StartScilab() never returns. Using gdb I can see the thread is stuck at StartScilabEngine->InitializeTclTk () -> OpenTCLsci () -> pthread_cond_wait@@GLIBC_2.3.2 Does anyone have any experience using call_scilab and can have some poiters on what might be going on? Thank you very much for any pointer! Matias *What am I running?* I am trying to make the very basic example here to work: https://help.scilab.org/docs/6.0.0/en_US/call_scilab.html I followed the steps to compile and execute from here: https://help.scilab.org/docs/6.0.0/en_US/compile_and_run_call_scilab.html I am running exactly the code of simple_call_scilab.c, just added 2 extra fprintf before and after the StartScilab. *Environment & compilation* After a while and a bit of fighting I was able to compile and execute: I first was trying to compile against Scilab5.5.1 (last stable version) but the compilation did not work. Then I switched to Scilab6.0-beta-2. Then when executing I got an error "Scilab should have 'libscijvm-disable' defined but gets 'libscijvm' instead.". I fixed this add also -lscijvm-disable. To execute the SCI path in the Scilab Twiki is not quite correct either. This is what I am using to compile, link and execute: I had downloaded and unzip the Scilab6.0-beta-2 in /home/. I am using CENTOS6: $> uname -a Linux pcatd143.cern.ch 2.6.32-642.3.1.el6.x86_64 #1 SMP Wed Jul 13 10:27:00 CEST 2016 x86_64 x86_64 x86_64 GNU/Linux *To compile&link:* export LD_LIBRARY_PATH=/home/scilab-6.0.0-beta-2/lib/thirdparty/:/home/scilab-6.0.0-beta-2/lib/scilab; gcc -o myExample -lscilab -lscijvm-disable -L/home/scilab-6.0.0-beta-2/lib/scilab -I/home/scilab-6.0.0-beta-2/include/scilab/ simple_call_scilab.c *To execute:* export SCI=/home/scilab-6.0.0-beta-2/share/scilab/ ./myExample *What I get* Not much... I added a fprintf before and after the StartScilab. I only see what it is printed before StartScilab. Using gdb to attach to the process and then getting the backtrace I see it is stuck in OpenTCLsci (does anyone know what is that?): #0 0x000000340200b68c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007fc1d28f6685 in OpenTCLsci () from /afs/cern.ch/user/m/mbonaven/Download/scilab-6.0.0-beta-2//lib/scilab/libscitclsci.so.6 #2 0x00007fc1d28f687d in InitializeTclTk () from /afs/cern.ch/user/m/mbonaven/Download/scilab-6.0.0-beta-2//lib/scilab/libscitclsci.so.6 #3 0x00007fc1d1dc22aa in StartScilabEngine (_pSEI=0x16664c0) at src/cpp/InitScilab.cpp:252 #4 0x00007fc1d6087d4d in Call_ScilabOpen () from /afs/cern.ch/user/m/mbonaven/Download/scilab-6.0.0-beta-2//lib/scilab/libscicall_scilab.so.6 #5 0x00007fc1d6087bb1 in StartScilab () from /afs/cern.ch/user/m/mbonaven/Download/scilab-6.0.0-beta-2//lib/scilab/libscicall_scilab.so.6 #6 0x0000000000409e31 in quickTest::initializeScilab (this=0x16660a0) at ../atomics/test_scilab_api/quickTest.cpp:56 -- View this message in context: http://mailinglists.scilab.org/Trying-to-use-call-scilab-tp4034541.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From matiasb at gmail.com Wed Aug 31 17:44:06 2016 From: matiasb at gmail.com (Matiasb) Date: Wed, 31 Aug 2016 08:44:06 -0700 (MST) Subject: [Scilab-users] Trying to use call_scilab In-Reply-To: <1472656314464-4034541.post@n3.nabble.com> References: <1472656314464-4034541.post@n3.nabble.com> Message-ID: <1472658246062-4034542.post@n3.nabble.com> Just one extra thing: I tried calling DisableInteractiveMode(); before the call to StartScilab. It is supposed to "Disable TCL/TK and graphic interfaces" but the problem persists... -- View this message in context: http://mailinglists.scilab.org/Trying-to-use-call-scilab-tp4034541p4034542.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.