From Frieder.Nikolaisen at student.hs-rm.de Tue Oct 4 07:43:44 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Tue, 04 Oct 2016 07:43:44 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57EE77D3.8040100@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> Message-ID: <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> Hello togehter, thank you for your answers. I do have to plot again and again for choosing the best time interval. Jens, what do you mean with using a single diagram? A diagram with one x and one y axis? And writing n/10^3 U/min) might look nicer, bit is not solving the problem of having the two needed information on the x axis: Time in YY.MM.DD.HH.MM.SS and the line in the Matrix. Best regards Frieder Am 30.09.2016 16:33, schrieb Jens Simon Strom: > Dear Frieder, > My first reflex is to dodge the questions you are asking and to use > a > simpler approach instead: > > Call the y-axis 'n/(10^3U/min), P/MW, a/(10m/s^2)' and plot the > values into one SINGLE diagram over 't/h' which is calculated as > (T-int(T))*24. Note that dividing the quantity by its unit gives the > number shown at the axis. This is a widely accepted convention to > draw > axes and clearer than 'P in MW' oder 'P [MW]'. I think the diagram > would look quite nice. > > Regards > Jens > ------------------------------------------------------- > > Am 30.09.2016 13:23, schrieb Frieder Nikolaisen: > >> Dear Jens, >> >> there is not much to be confused about. I have attached my >> Diagramms with that Code but real data. The mininmal example is just >> crap, because of the random Matrix A. >> >> The Grafik-Fenster Nummer 100000 is only for choosing the Intervall >> of intrest. The 100001 is the detail to look at. It's just about a >> vehicle dooing shunting. I will include the possiblilty to choose >> the paramater you want to look at. Right now turn per minute and >> power arn't that useful. >> >> Best regards >> Frieder >> >> Am 30.09.2016 11:48, schrieb Jens Simon Strom: >> >>> Dear Frieder, >>> It looks like you would like to put plenty of information into >>> one >>> single diagram. This tends to become confusing and difficult to >>> read. >>> It would help your helpers if you enclosed a (manual) sketch how >>> the >>> final result of your visualisation should look like. And perhaps >>> that >>> could trigger you to review the layout of what you plan to plot. >>> Regards >>> Jens >>> >>> >> > > ------------------------------------------------------------------------------------ >>> >>> Am 30.09.2016 11:27, schrieb Frieder Nikolaisen: >>> >>>> I did forgott one Point: >>>> >>>> My data Looks like: >>>> >>>> Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen >>>> Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen >>>> aktiv >>>> >>>> 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 0 0 1 0 0 >>>> 0 >>>> 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 0 0 1 0 >>>> 0 0 >>>> ... >>>> 04.04.2012 12:13:15.910 46482.9710 15.10 1344.19 0.49 1 1 1 1 1 >>>> 0 1 >>>> >>>> I want to plot some paramters over the time. I used datenum - >>>> but then the Diagramm cant be read easy. How could I print the >>>> time instead of Serial date number on the axes as well as the >>>> row number? (plotxxyyy x1=real time in DD MM YY HH MM SS, x2=row >>>> number and yyy) >>>> >>>> I do read These file in a Matrix, I add some more paramters and >>>> print: >>>> >>>> Zeit Distanz Geschwindigkeit 1 Drehzahl >>>> Getriebeausgangsleistung [Watt] Zugkraft [N] Beschleunigung >>>> [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen >>>> Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen >>>> aktiv >>>> 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 0 0 0 0 1 0 >>>> 0 >>>> 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 0 1 0 >>>> 0 >>>> ... >>>> >>>> For beeing used in a secound Programm. >>>> >>>> Best regards >>>> >>>> -------- Originalnachricht -------- >>>> Betreff: [Scilab-users] plotxxyyy >>>> Datum: 30.09.2016 11:17 >>>> Absender: Frieder Nikolaisen >>>> [1] >>>> Empf?nger: Users mailing list for Scilab >>>> [2] >>>> Antwort an: Users mailing list for Scilab >>>> [3] >>>> >>>> Hello everybody, >>>> >>>> with you help I got my programm so far running pretty well. Now >>>> I have trouble again with the plotting. I used the demos_gui >>>> plotyyy, but want now the plotxxyyy. How to implement xx? I >>>> attach my minimal example with a random Matrix, instead of the >>>> real one I use. >>>> >>>> This programm will be used at my theses. So I want to do >>>> correct quotes. I am used how to do this a text, but how is it >>>> done in a programm? >>>> >>>> I do get Errors, if I do not open the example plotyyy - is this >>>> really necessary? >>>> " plotyyy=uigetfile('plotyyy.dem.sce'); mopen(plotyyy) " >>>> >>>> Best regards >>>> Frieder Nikolaisen >>>> >>>> The minimal Code: >>>> >>>> //Write your callback for Diagramm here >>>> >>>> A=rand(15,50) >>>> >>>> //Dieser Code und geistiges Eigentum von Samuel GOUGEON wird >>>> ge?ndert und angepasst von Frieder Nikolaisen (FN), bleibt in >>>> seinen Grundz?gen jedoch erhalten >>>> >>>> // Scilab ( http://www.scilab.org/ [4] ) - This file is part of >>>> Scilab >>>> // Copyright (C) 2010 Samuel GOUGEON >>>> // Copyright (C) 2010 - DIGITEO - Allan CORNET >>>> // >>>> // This file is released under the 3-clause BSD license. See >>>> COPYING-BSD. >>>> >>>> function demo_plotyyy() >>>> >>>> plotyyy=uigetfile('plotyyy.dem.sce') // hinzugef?gt von FN >>>> (changed by Frieder Nikolaisen) >>>> mopen(plotyyy) // hinzugef?gt von FN >>>> >>>> // DEMO START >>>> // A plotyyy() example: >>>> //http://bugzilla.scilab.org/show_bug.cgi?id=6070 [5] >>>> >>>> my_handle = scf(100000); >>>> clf(my_handle); >>>> >>>> // Preparing data >>>> x = A(:,1); //Serial Date Number ge?ndert durch FN (changed by >>>> Frieder Nikolaisen) >>>> y2 = A(:,5); //Leistung ge?ndert durch FN >>>> y3 = A(:,7) //Beschleunigung ge?ndert durch FN >>>> >>>> drawlater() >>>> demo_viewCode("plotyyy.dem.sce"); >>>> >>>> // Axis y1 >>>> y1=A(:,4); //Drehzahl ge?ndert durch FN >>>> plot2d(x,y1) >>>> xtitle([gettext("Leistung, Drehzahl und Beschleunigung");" >>>> "],.. >>>> gettext("Serial Date Numbers"),gettext("Drehzahl in U/min")); >>>> // ge?ndert durch FN >>>> >>>> // Axis y2 >>>> c=color("blue"); >>>> na=newaxes(); >>>> na.foreground=c; >>>> na.font_color=c; >>>> plot2d(x,y2,style=c) >>>> ylabel("Leistung in Watt","color",[0 0 1]) // ge?ndert durch >>>> FN >>>> na.children(1).children(1).thickness=2; >>>> na.filled="off"; >>>> na.axes_visible(1)="off"; >>>> // na.axes_reverse(2)="on"; >>>> na.y_location="middle"; >>>> >>>> // Axis y3 >>>> c=color("red"); >>>> na=newaxes(); >>>> na.foreground=c; // Axis and ticks color >>>> na.font_color=c; // Labels's color >>>> plot2d(x,y3,style=c); >>>> ylabel("Beschleunigung in m/s","color",[1 0 0]) // ge?ndert >>>> durch FN >>>> na.filled="off"; // Transparent background, letting the first >>>> plot appearing >>>> na.axes_visible(1)="off"; // Masking the x axis (useless >>>> overlay) >>>> na.y_location="right"; // Y axis on the right side >>>> na.children(1).children(1).thickness=2; // Curve thickness >>>> >>>> drawnow() >>>> >>>> // DEMO END >>>> mclose(plotyyy) >>>> >>>> endfunction >>>> >>>> demo_plotyyy(); >>>> clear demo_plotyyy; >>>> >>>> // Code von Samuel GOUGEON endet >>>> >>>> set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org [6] >>>> http://lists.scilab.org/mailman/listinfo/users [7] >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org [8] >>>> http://lists.scilab.org/mailman/listinfo/users [9] >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org [10] >>> http://lists.scilab.org/mailman/listinfo/users [11] >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > Links: > ------ > [1] mailto:Frieder.Nikolaisen at student.hs-rm.de > [2] mailto:users at lists.scilab.org > [3] mailto:users at lists.scilab.org > [4] http://www.scilab.org/ > [5] http://bugzilla.scilab.org/show_bug.cgi?id=6070 > [6] mailto:users at lists.scilab.org > [7] http://lists.scilab.org/mailman/listinfo/users > [8] mailto:users at lists.scilab.org > [9] http://lists.scilab.org/mailman/listinfo/users > [10] mailto:users at lists.scilab.org > [11] http://lists.scilab.org/mailman/listinfo/users From j.s.strom at hslmg.de Tue Oct 4 10:38:54 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Tue, 04 Oct 2016 10:38:54 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> Message-ID: <57F36A9E.4090206@hslmg.de> Hallo Frieder, I mean a diagram with /one/ y-axis quantified by /one/ numeric /scale/. The x-axis could be the automatically generated one showing the serial date number, advantageously shortened by an adequate offset. The YY.MM.DD.HH.MM.SS information could be accomodated at the bottom of the diagram by means of xstring(). The following minimal example my explain the approach. //dummy data yr=[2016]*ones(1,5); mh=10*ones(yr); dy=4*ones(yr); hr=10*ones(yr); mn=11*ones(yr); sd=[41:45]; dn=datenum(yr,mh,dy,hr,mn,sd) dv=datevec(dn) dv(:,1)=dv(:,1)-2000//two digits only xdel(); x=(dn-dn(1))*24*3600;//offset,time measured in seconds y=x;//dummy data plot(x,y,'o-') // with date as YY.MM.DD.HH.MM.SS for k=1:length(dn)//Beschrift xstring(x(k),x(1),string(round(dv(k,:))')) end Kind regards Jens ---------------------------------------------------------------------------------------------------------- Am 04.10.2016 07:43, schrieb Frieder Nikolaisen: > Hello togehter, > > thank you for your answers. I do have to plot again and again for > choosing the best time interval. > > Jens, what do you mean with using a single diagram? A diagram with one > x and one y axis? And writing n/10^3 U/min) might look nicer, bit is > not solving the problem of having the two needed information on the x > axis: Time in YY.MM.DD.HH.MM.SS and the line in the Matrix. > > Best regards > Frieder > > > > Am 30.09.2016 16:33, schrieb Jens Simon Strom: >> Dear Frieder, >> My first reflex is to dodge the questions you are asking and to use a >> simpler approach instead: >> >> Call the y-axis 'n/(10^3U/min), P/MW, a/(10m/s^2)' and plot the >> values into one SINGLE diagram over 't/h' which is calculated as >> (T-int(T))*24. Note that dividing the quantity by its unit gives the >> number shown at the axis. This is a widely accepted convention to draw >> axes and clearer than 'P in MW' oder 'P [MW]'. I think the diagram >> would look quite nice. >> >> Regards >> Jens >> ------------------------------------------------------- >> >> Am 30.09.2016 13:23, schrieb Frieder Nikolaisen: >> >>> Dear Jens, >>> >>> there is not much to be confused about. I have attached my >>> Diagramms with that Code but real data. The mininmal example is just >>> crap, because of the random Matrix A. >>> >>> The Grafik-Fenster Nummer 100000 is only for choosing the Intervall >>> of intrest. The 100001 is the detail to look at. It's just about a >>> vehicle dooing shunting. I will include the possiblilty to choose >>> the paramater you want to look at. Right now turn per minute and >>> power arn't that useful. >>> >>> Best regards >>> Frieder >>> >>> Am 30.09.2016 11:48, schrieb Jens Simon Strom: >>> >>>> Dear Frieder, >>>> It looks like you would like to put plenty of information into >>>> one >>>> single diagram. This tends to become confusing and difficult to >>>> read. >>>> It would help your helpers if you enclosed a (manual) sketch how >>>> the >>>> final result of your visualisation should look like. And perhaps >>>> that >>>> could trigger you to review the layout of what you plan to plot. >>>> Regards >>>> Jens >>>> >>>> >>> >> >> ------------------------------------------------------------------------------------ >> >>>> >>>> Am 30.09.2016 11:27, schrieb Frieder Nikolaisen: >>>> >>>>> I did forgott one Point: >>>>> >>>>> My data Looks like: >>>>> >>>>> Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen >>>>> Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen >>>>> aktiv >>>>> >>>>> 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 0 0 1 0 0 >>>>> 0 >>>>> 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 0 0 1 0 >>>>> 0 0 >>>>> ... >>>>> 04.04.2012 12:13:15.910 46482.9710 15.10 1344.19 0.49 1 1 1 1 1 >>>>> 0 1 >>>>> >>>>> I want to plot some paramters over the time. I used datenum - >>>>> but then the Diagramm cant be read easy. How could I print the >>>>> time instead of Serial date number on the axes as well as the >>>>> row number? (plotxxyyy x1=real time in DD MM YY HH MM SS, x2=row >>>>> number and yyy) >>>>> >>>>> I do read These file in a Matrix, I add some more paramters and >>>>> print: >>>>> >>>>> Zeit Distanz Geschwindigkeit 1 Drehzahl >>>>> Getriebeausgangsleistung [Watt] Zugkraft [N] Beschleunigung >>>>> [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen >>>>> Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen >>>>> aktiv >>>>> 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 0 0 0 0 1 0 >>>>> 0 >>>>> 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 0 1 0 >>>>> 0 >>>>> ... >>>>> >>>>> For beeing used in a secound Programm. >>>>> >>>>> Best regards >>>>> >>>>> -------- Originalnachricht -------- >>>>> Betreff: [Scilab-users] plotxxyyy >>>>> Datum: 30.09.2016 11:17 >>>>> Absender: Frieder Nikolaisen >>>>> [1] >>>>> Empf?nger: Users mailing list for Scilab >>>>> [2] >>>>> Antwort an: Users mailing list for Scilab >>>>> [3] >>>>> >>>>> Hello everybody, >>>>> >>>>> with you help I got my programm so far running pretty well. Now >>>>> I have trouble again with the plotting. I used the demos_gui >>>>> plotyyy, but want now the plotxxyyy. How to implement xx? I >>>>> attach my minimal example with a random Matrix, instead of the >>>>> real one I use. >>>>> >>>>> This programm will be used at my theses. So I want to do >>>>> correct quotes. I am used how to do this a text, but how is it >>>>> done in a programm? >>>>> >>>>> I do get Errors, if I do not open the example plotyyy - is this >>>>> really necessary? >>>>> " plotyyy=uigetfile('plotyyy.dem.sce'); mopen(plotyyy) " >>>>> >>>>> Best regards >>>>> Frieder Nikolaisen >>>>> >>>>> The minimal Code: >>>>> >>>>> //Write your callback for Diagramm here >>>>> >>>>> A=rand(15,50) >>>>> >>>>> //Dieser Code und geistiges Eigentum von Samuel GOUGEON wird >>>>> ge?ndert und angepasst von Frieder Nikolaisen (FN), bleibt in >>>>> seinen Grundz?gen jedoch erhalten >>>>> >>>>> // Scilab ( http://www.scilab.org/ [4] ) - This file is part of >>>>> Scilab >>>>> // Copyright (C) 2010 Samuel GOUGEON >>>>> // Copyright (C) 2010 - DIGITEO - Allan CORNET >>>>> // >>>>> // This file is released under the 3-clause BSD license. See >>>>> COPYING-BSD. >>>>> >>>>> function demo_plotyyy() >>>>> >>>>> plotyyy=uigetfile('plotyyy.dem.sce') // hinzugef?gt von FN >>>>> (changed by Frieder Nikolaisen) >>>>> mopen(plotyyy) // hinzugef?gt von FN >>>>> >>>>> // DEMO START >>>>> // A plotyyy() example: >>>>> //http://bugzilla.scilab.org/show_bug.cgi?id=6070 [5] >>>>> >>>>> my_handle = scf(100000); >>>>> clf(my_handle); >>>>> >>>>> // Preparing data >>>>> x = A(:,1); //Serial Date Number ge?ndert durch FN (changed by >>>>> Frieder Nikolaisen) >>>>> y2 = A(:,5); //Leistung ge?ndert durch FN >>>>> y3 = A(:,7) //Beschleunigung ge?ndert durch FN >>>>> >>>>> drawlater() >>>>> demo_viewCode("plotyyy.dem.sce"); >>>>> >>>>> // Axis y1 >>>>> y1=A(:,4); //Drehzahl ge?ndert durch FN >>>>> plot2d(x,y1) >>>>> xtitle([gettext("Leistung, Drehzahl und Beschleunigung");" >>>>> "],.. >>>>> gettext("Serial Date Numbers"),gettext("Drehzahl in U/min")); >>>>> // ge?ndert durch FN >>>>> >>>>> // Axis y2 >>>>> c=color("blue"); >>>>> na=newaxes(); >>>>> na.foreground=c; >>>>> na.font_color=c; >>>>> plot2d(x,y2,style=c) >>>>> ylabel("Leistung in Watt","color",[0 0 1]) // ge?ndert durch >>>>> FN >>>>> na.children(1).children(1).thickness=2; >>>>> na.filled="off"; >>>>> na.axes_visible(1)="off"; >>>>> // na.axes_reverse(2)="on"; >>>>> na.y_location="middle"; >>>>> >>>>> // Axis y3 >>>>> c=color("red"); >>>>> na=newaxes(); >>>>> na.foreground=c; // Axis and ticks color >>>>> na.font_color=c; // Labels's color >>>>> plot2d(x,y3,style=c); >>>>> ylabel("Beschleunigung in m/s","color",[1 0 0]) // ge?ndert >>>>> durch FN >>>>> na.filled="off"; // Transparent background, letting the first >>>>> plot appearing >>>>> na.axes_visible(1)="off"; // Masking the x axis (useless >>>>> overlay) >>>>> na.y_location="right"; // Y axis on the right side >>>>> na.children(1).children(1).thickness=2; // Curve thickness >>>>> >>>>> drawnow() >>>>> >>>>> // DEMO END >>>>> mclose(plotyyy) >>>>> >>>>> endfunction >>>>> >>>>> demo_plotyyy(); >>>>> clear demo_plotyyy; >>>>> >>>>> // Code von Samuel GOUGEON endet >>>>> >>>>> set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org [6] >>>>> http://lists.scilab.org/mailman/listinfo/users [7] >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org [8] >>>>> http://lists.scilab.org/mailman/listinfo/users [9] >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org [10] >>>> http://lists.scilab.org/mailman/listinfo/users [11] >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> >> >> Links: >> ------ >> [1] mailto:Frieder.Nikolaisen at student.hs-rm.de >> [2] mailto:users at lists.scilab.org >> [3] mailto:users at lists.scilab.org >> [4] http://www.scilab.org/ >> [5] http://bugzilla.scilab.org/show_bug.cgi?id=6070 >> [6] mailto:users at lists.scilab.org >> [7] http://lists.scilab.org/mailman/listinfo/users >> [8] mailto:users at lists.scilab.org >> [9] http://lists.scilab.org/mailman/listinfo/users >> [10] mailto:users at lists.scilab.org >> [11] http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Tue Oct 4 19:28:01 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Tue, 4 Oct 2016 19:28:01 +0200 Subject: [Scilab-users] predictive_gui doesn't work anymore with scilab 5.5.2 x64 W10 Message-ID: <001101d21e64$a8ea0e80$fabe2b80$@wanadoo.fr> Dear Scilab team, predictive_gui generates error when invoking the generator with scilab 5.5.2. It also seems that this command doesn?t work at all with scilab 6.0.0 b2 I use Scilab 64 bits on W10. Error : -->predictive_gui Generating RST controler... !--error 4 Variable non d?finie : linear_sys at line 2 of function %eval called by : at line 20 of function eval called by : at line 10 of function rst_callback called by : = gcbo; end;gcbo = getcallbackobject(125);rst_callback;if exists("%oldgcbo") then gcb while executing a callback See also bugzilla #14794 for attached files Sincerely Pierre P. Before printing, think about ENVIRONMENTAL responsabity -------------- 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 paul.carrico at free.fr Tue Oct 4 19:31:41 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 4 Oct 2016 19:31:41 +0200 (CEST) Subject: [Scilab-users] Forum dedicated to Scilab developments In-Reply-To: <1583447864.357634967.1475601967334.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <312669039.357653673.1475602301384.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi Recently somebody reminded me that the current mailing list is dedicated to Scilab topics (on only to) i.e. on ways on using Scilab. Does it exist a forum dedicated to developments using Scilab, so that people can share skills or ask for support(s) in specific topics/tasks? In my mind a way to share codes and so on! Nb : Equalis forum is nearly dead, developper.com is for French speakers ... I've been hesitating in writting this post, but I'm thinking it might be an interesting questionning ... if not it does not matter Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Oct 4 21:38:05 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 4 Oct 2016 21:38:05 +0200 Subject: [Scilab-users] Forum dedicated to Scilab developments In-Reply-To: <312669039.357653673.1475602301384.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <312669039.357653673.1475602301384.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <57F4051D.6000905@free.fr> Hello, Le 04/10/2016 19:31, paul.carrico at free.fr a ?crit : > Hi > > Recently somebody reminded me that the current mailing list is > dedicated to Scilab topics (on only to) i.e. on ways on using Scilab. > > *_Does it exist a forum dedicated to developments using Scilab,_* so > that people can share skills or ask for support(s) in specific > topics/tasks? . Isn't it what we do here? See also http://mailinglists.scilab.org/ > In my mind a way to share codes and so on! We may do it here as well, and there: https://fileexchange.scilab.org/ Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Tue Oct 4 22:07:29 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Tue, 4 Oct 2016 22:07:29 +0200 (CEST) Subject: [Scilab-users] Forum dedicated to Scilab developments In-Reply-To: <57F4051D.6000905@free.fr> Message-ID: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> Well I'm speaking about projects using Scilab (and then related to it), but not directly how to use it. For example, we can find forums dedicated to Electronics, Signal processing, Mechanical engineering, Optimization, Arduino and so on, in different places and not necessary using a common tool such as Scilab. Based on my own experience, I've ever asked advices on fields that are not in my skills , and I've had friendly supports. Now I've been wondering if it wouldn't be interesting to have one centralizing exchanges .... but maybe I'm too naive it does not matter Paul ----- Mail original ----- De: "Samuel Gougeon" ?: "Users mailing list for Scilab" Envoy?: Mardi 4 Octobre 2016 21:38:05 Objet: Re: [Scilab-users] Forum dedicated to Scilab developments Hello, Le 04/10/2016 19:31, paul.carrico at free.fr a ?crit : Hi Recently somebody reminded me that the current mailing list is dedicated to Scilab topics (on only to) i.e. on ways on using Scilab. Does it exist a forum dedicated to developments using Scilab, so that people can share skills or ask for support(s) in specific topics/tasks? . Isn't it what we do here? See also http://mailinglists.scilab.org/
In my mind a way to share codes and so on!
We may do it here as well, and there: https://fileexchange.scilab.org/ Samuel Gougeon _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From shamika.i.nair at gmail.com Wed Oct 5 06:54:39 2016 From: shamika.i.nair at gmail.com (Shamika Mohanan) Date: Wed, 5 Oct 2016 10:24:39 +0530 Subject: [Scilab-users] API Error Message-ID: Hello, I'm using Scilab 5.5.0 API in c++ code. I have the following code- sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr); if(sciErr.iErr) { printError(&sciErr, 0); return 0 } sciErr = getListItemNumber(pvApiCtx, piAddr, &noItemList); if(sciErr.iErr) { printError(&sciErr, 0); sciprint("This variable is not a list"); return 0; } for( a= 1 ;a<=noItemList ; a++) { sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, a, &iRows, &iCols, &listItem); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } } This is part of a larger function. For the function call d=callOct(c),where c is an mlist (3D matrix), I get the error API Error: in getMatrixOfDoubleInList: Unable to get address of item #2 in argument #1 in getMatrixOfDouble: Invalid argument type, double matrix expected What am I doing wrong? Shamika -------------- next part -------------- An HTML attachment was scrubbed... URL: From clement.david at scilab-enterprises.com Wed Oct 5 10:29:48 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Wed, 05 Oct 2016 10:29:48 +0200 Subject: [Scilab-users] Forum dedicated to Scilab developments In-Reply-To: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1475656188.10762.24.camel@scilab-enterprises.com> Hello Paul, Thanks for asking after Tim remark on specialized content. To clarify, I would like to give some general advices about this ML. IMHO This ML is good for general Scilab / Scientific questions across domains covered by the Scilab software. For very specific questions, it might be better to use dedicated forums and "translate" the answer to Scilab code or Xcos diagrams. Do not hesitate to re-post in this ML, the original question and the corresponding Scilab code asking for advice or Scilab code analysis. So yes, Samuel is right ; you can use this ML for asking for or reporting on any scientific content. I understood Tim remark as a "keep focus on Scilab related content" on this ML and it is true in general *but* as the Scilab team does not provide domain specific ML / forums to avoid fragmentation of the community ; you might also use this ML for reporting your developments as far as these are related to Scilab. Thanks, PS: I asked myself to react after Tim remark but chose to let the community handle it first :). -- Cl?ment Le mardi 04 octobre 2016 ? 22:07 +0200, paul.carrico at free.fr a ?crit?: > Well I'm speaking about projects using Scilab (and then related to it), but not directly how to > use it. > > For example, we can find forums dedicated to Electronics, Signal processing, Mechanical > engineering, Optimization, Arduino and so on, in different places and not necessary using a common > tool such as Scilab.? > > Based on my own experience, I've ever asked advices on fields that are not in my skills , and I've > had friendly supports. > > Now I've been wondering if it wouldn't be interesting to have one centralizing exchanges .... but > maybe I'm too naive > > it does not matter > > Paul > > De: "Samuel Gougeon" > ?: "Users mailing list for Scilab" > Envoy?: Mardi 4 Octobre 2016 21:38:05 > Objet: Re: [Scilab-users] Forum dedicated to Scilab developments > > Hello, > > Le 04/10/2016 19:31, paul.carrico at free.fr a ?crit?: > Hi > > Recently somebody reminded me that the current mailing list is dedicated to Scilab topics (on only > to) i.e. on ways on using Scilab. > > Does it exist a forum dedicated to developments using Scilab, so that people can share skills or > ask for support(s) in specific topics/tasks? > . > Isn't it what we do here? > See also http://mailinglists.scilab.org/ > > In my mind a way to share codes and so on! > We may do it here as well,? > and there: https://fileexchange.scilab.org/ > > Samuel Gougeon > > > _______________________________________________ > 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 jrafaelbguerra at hotmail.com Wed Oct 5 15:57:55 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 5 Oct 2016 13:57:55 +0000 Subject: [Scilab-users] Forum dedicated to Scilab developments References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> Message-ID: Hello all, Just to add 2 cents. The ML is a place to learn about Scilab in a faster and more pleasant way. And for this purpose, I specially enjoy the questions and answers that include data, Scilab code and/or some illustrations. Many questions posed mix Scilab knowledge with some more or less complex discipline specifics but, they always focus on the Scilab implementation. On the other hand, going to a specialty forum can sometimes become a struggle in the wilderness for the non-experts. PS: To end with a fun note, here below is a Scilab example of a Mobius strip which can be easily converted into a doughnut by changing only one character. I let you guess which. clf() R = 2; r = 1; p1=linspace(0,2*%pi,50); p2=linspace(0,2*%pi,50); deff("[x,y,z]=f(p1,p2)",["x=(R+r*cos(p1)).*cos(p2)";.. "y=(R+r*cos(p1)).*sin(p2)";.. "z=r*sin(p2)"]) [x,y,z]=eval3dp(f,p1,p2); plot3d(x,y,z) a=gca(); a.rotation_angles=[87 50]; Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Cl?ment David Sent: Wednesday, October 05, 2016 10:30 AM To: users at lists.scilab.org Subject: Re: [Scilab-users] Forum dedicated to Scilab developments Hello Paul, Thanks for asking after Tim remark on specialized content. To clarify, I would like to give some general advices about this ML. IMHO This ML is good for general Scilab / Scientific questions across domains covered by the Scilab software. For very specific questions, it might be better to use dedicated forums and "translate" the answer to Scilab code or Xcos diagrams. Do not hesitate to re-post in this ML, the original question and the corresponding Scilab code asking for advice or Scilab code analysis. So yes, Samuel is right ; you can use this ML for asking for or reporting on any scientific content. I understood Tim remark as a "keep focus on Scilab related content" on this ML and it is true in general *but* as the Scilab team does not provide domain specific ML / forums to avoid fragmentation of the community ; you might also use this ML for reporting your developments as far as these are related to Scilab. Thanks, PS: I asked myself to react after Tim remark but chose to let the community handle it first :). -- Cl?ment -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.bignier at scilab-enterprises.com Wed Oct 5 17:07:09 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Wed, 5 Oct 2016 17:07:09 +0200 Subject: [Scilab-users] API Error In-Reply-To: References: Message-ID: Hello Shamika, Are you sure that 'c' is a mlist? When I try you code with -->c=hypermat([2 3 2 2],1:24); callOct(c); with a dummy callOct, I get an early error in getListItemNumber: "API error: in getListItemNumber: Invalid argument type, list expected" "This variable is not a list" Now wen I try with -->c=list(1,2,3); callOct(c); I don't get an error. Hope this helps, Paul On 10/05/2016 06:54 AM, Shamika Mohanan wrote: > Hello, > > I'm using Scilab 5.5.0 API in c++ code. I have the following code- > > sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr); > if(sciErr.iErr) > { > printError(&sciErr, 0); > return 0 > } > > sciErr = getListItemNumber(pvApiCtx, piAddr, &noItemList); > if(sciErr.iErr) > { > printError(&sciErr, 0); > sciprint("This variable is not a list"); > return 0; > } > for( a= 1 ;a<=noItemList ; a++) > { > sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, a, &iRows, &iCols, > &listItem); > if(sciErr.iErr) > { > printError(&sciErr, 0); > return 0; > } > } > > This is part of a larger function. For the function call > d=callOct(c),where c is an mlist (3D matrix), I get the error > > API Error: > in getMatrixOfDoubleInList: Unable to get address of item #2 in > argument #1 > in getMatrixOfDouble: Invalid argument type, double matrix expected > > What am I doing wrong? > > Shamika > > > _______________________________________________ > 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 jrafaelbguerra at hotmail.com Wed Oct 5 19:47:50 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 5 Oct 2016 17:47:50 +0000 Subject: [Scilab-users] Forum dedicated to Scilab developments In-Reply-To: References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> Message-ID: (correction to PS: in previous email) What looked like a Mobius strip finally isn?t one. For the record, here below the correct equation: p1=linspace(-1,1,50); p2=linspace(0,2*%pi,50); deff("[x,y,z]=f(p1,p2)",["x=(R+r*p1.*cos(p2/2)).*cos(p2)";.. "y=(R+r*p1.*cos(p2/2)).*sin(p2)";.. "z=r*p1.*sin(p2/2)"]) [x,y,z]=eval3dp(f,p1,p2); plot3d(x,y,z) a=gca(); a.rotation_angles=[87 50]; Regards, Rafael -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Wed Oct 5 20:25:06 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Wed, 05 Oct 2016 11:25:06 -0700 Subject: [Scilab-users] Forum dedicated to Scilab developments In-Reply-To: <312669039.357653673.1475602301384.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <312669039.357653673.1475602301384.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1475691906.2813.115.camel@Servo> To the extent that this may have been sparked by my comments in your thread about the FFT ("shift phase in fft"): Please don't stop asking questions here if it is the forum that you are the most comfortable with. I was expressing the opinion that for discussions of the underlying math, there are other resources, and I was acting on a -- possibly unfounded, in your case -- concern arising from seeing other people who seem to have difficulty unraveling the behavior of the tool from the structure of the underlying math. As long as I'm subscribed to the list, I won't hesitate to discuss the underlying math when I think that's warranted. And, in those cases where I actually know how to make the tool cough up results in ways that aren't totally screwy, I'll speak up there, too. On Tue, 2016-10-04 at 19:31 +0200, paul.carrico at free.fr wrote: > Hi > > Recently somebody reminded me that the current mailing list is > dedicated to Scilab topics (on only to) i.e. on ways on using Scilab. > > Does it exist a forum dedicated to developments using Scilab, so that > people can share skills or ask for support(s) in specific > topics/tasks? In my mind a way to share codes and so on! > > Nb: Equalis forum is nearly dead, developper.com is for French > speakers ... > > I've been hesitating in writting this post, but I'm thinking it might > be an interesting questionning ... if not it does not matter > > Paul > _______________________________________________ > 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 paul.carrico at free.fr Wed Oct 5 21:55:47 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Wed, 5 Oct 2016 21:55:47 +0200 (CEST) Subject: [Scilab-users] Forum dedicated to Scilab developments -> practical concern In-Reply-To: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <743332038.362096508.1475697347537.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi In attachment is typically a project I'm working on : determination of peaks and valley on a noisy signal; Trying to avoid reinventing the wheel, I had a look on information's and algorithms on internet .... not so easy topics I was thinking at the first time. Typically a project that can federate people around ... an example among others Nb : the "peaks detector" project is non applicable on noisy signals (while vectorization is quit interresting) Paul ----- Mail original ----- De: "paul carrico" ?: "Users mailing list for Scilab" Envoy?: Mardi 4 Octobre 2016 22:07:29 Objet: Re: [Scilab-users] Forum dedicated to Scilab developments Well I'm speaking about projects using Scilab (and then related to it), but not directly how to use it. For example, we can find forums dedicated to Electronics, Signal processing, Mechanical engineering, Optimization, Arduino and so on, in different places and not necessary using a common tool such as Scilab. Based on my own experience, I've ever asked advices on fields that are not in my skills , and I've had friendly supports. Now I've been wondering if it wouldn't be interesting to have one centralizing exchanges .... but maybe I'm too naive it does not matter Paul ----- Mail original ----- De: "Samuel Gougeon" ?: "Users mailing list for Scilab" Envoy?: Mardi 4 Octobre 2016 21:38:05 Objet: Re: [Scilab-users] Forum dedicated to Scilab developments Hello, Le 04/10/2016 19:31, paul.carrico at free.fr a ?crit : Hi Recently somebody reminded me that the current mailing list is dedicated to Scilab topics (on only to) i.e. on ways on using Scilab. Does it exist a forum dedicated to developments using Scilab, so that people can share skills or ask for support(s) in specific topics/tasks? . Isn't it what we do here? See also http://mailinglists.scilab.org/
In my mind a way to share codes and so on!
We may do it here as well, and there: https://fileexchange.scilab.org/ Samuel Gougeon _______________________________________________ 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: peak_valley_search.sce Type: application/octet-stream Size: 6317 bytes Desc: not available URL: From sgougeon at free.fr Wed Oct 5 22:10:05 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 5 Oct 2016 22:10:05 +0200 Subject: [Scilab-users] Forum dedicated to Scilab developments In-Reply-To: References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> Message-ID: <57F55E1D.8010902@free.fr> Le 05/10/2016 19:47, Rafael Guerra a ?crit : > > /(correction to PS: in previous email)/ > > What looked like a Mobius strip finally isn?t one. For the record, > here below the correct equation: > Do you still promise a donut against one character change from this new code ? A 2-cent donut, it is rather cheap. A 1-char job as well. :) > p1=_linspace_(-1,1,50); > > p2=_linspace_(0,2*%pi,50); > > deff("[x,y,z]=f(p1,p2)",["x=(R+r*p1.*cos(p2/2)).*cos(p2)";.. > > "y=(R+r*p1.*cos(p2/2)).*sin(p2)";.. > > "z=r*p1.*sin(p2/2)"]) > > [x,y,z]=_eval3dp_(f,p1,p2); > > plot3d(x,y,z) > > a=_gca_(); > > a.rotation_angles=[8750]; > > Regards, > > Rafael > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frieder.Nikolaisen at student.hs-rm.de Thu Oct 6 08:17:31 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Thu, 06 Oct 2016 08:17:31 +0200 Subject: [Scilab-users] !--error 21 In-Reply-To: <1475656188.10762.24.camel@scilab-enterprises.com> References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> Message-ID: <88c52ae3da494eef04ba3c4a8d77d822@mail.student.hs-rm.de> Hello everybody, I do have a code, I cannot find the mistake. I get the error: " if A(c-1,3)==0 then !--error 21 ung?ltiger Index. at line 11 of exec file called by : exec('M:\CAD\Abteilungen\Praktikanten\Nikolaisen, Frieder\Fahrdaten\Testprogramm\Archive\test2.sce', -1)" My minimal example Code with random Matrix instead of the real used one: //example code for c=1:10 A=rand(10:30) dm=0 vor_starter=0 starter=0 //start of buggy code if c>=2 then if A(c-1,3)==0 then if A(c,7)>0 then beginnZ=c vor_starter=1 / end end //Endzeile festlegen if vor_starter==1 then if A(c-1,7)>0 then / if A(c,7)<=0 then endZ=c-1 starter=1 vor_starter=0 end end end //Berechnung der Zugmasse if starter==1 then time3=datevec(A(beginnZ,1)) time4=datevec(A(endZ,1)) delta_t=etime(time3, time4) delta_v=(A(endZ,3)-A(beginnZ,3)*3.6) // m/s length_F=length(beginnZ:endZ) mittel_F=sum(A(beginnz:endZ,6)/length_F) dm= (delta_t/delta_v) / mittel_F starter=0 end end if dm~=0 then disp(dm) end // end of buggy code end The real Matrix Looks like These: Zeit Distanz Geschwindigkeit 1 Drehzahl Getriebeausgangsleistung [Watt] Zugkraft [N] Beschleunigung [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen aktiv 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 0 0 0 0 1 0 0 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 0 1 0 0 734962.404902 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 1 1 1 0 734962.404971 46476.495 1.70 1059.06 110500 234000 1.04 0 0 1 1 1 1 0 ... Best regards Frieder From paul.carrico at esterline.com Thu Oct 6 08:21:04 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 6 Oct 2016 06:21:04 +0000 Subject: [Scilab-users] [EXTERNAL] !--error 21 In-Reply-To: <88c52ae3da494eef04ba3c4a8d77d822@mail.student.hs-rm.de> References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> <88c52ae3da494eef04ba3c4a8d77d822@mail.student.hs-rm.de> Message-ID: <3A6B7233274DB449A2A0053A47684F953F71A028@BGS-EX01.auxitrol.ad> Without launching the code, I would say : C = 1 : 30 And A(c-1,3) If c = 1 then A(0,3) that is not possible since the index start to 1 ... no ? -----Message d'origine----- De?: users [mailto:users-bounces at lists.scilab.org] De la part de Frieder Nikolaisen Envoy??: jeudi 6 octobre 2016 08:18 ??: Users mailing list for Scilab Objet?: [EXTERNAL] [Scilab-users] !--error 21 Hello everybody, I do have a code, I cannot find the mistake. I get the error: " if A(c-1,3)==0 then !--error 21 ung?ltiger Index. at line 11 of exec file called by : exec('M:\CAD\Abteilungen\Praktikanten\Nikolaisen, Frieder\Fahrdaten\Testprogramm\Archive\test2.sce', -1)" My minimal example Code with random Matrix instead of the real used one: //example code for c=1:10 A=rand(10:30) dm=0 vor_starter=0 starter=0 //start of buggy code if c>=2 then if A(c-1,3)==0 then if A(c,7)>0 then beginnZ=c vor_starter=1 / end end //Endzeile festlegen if vor_starter==1 then if A(c-1,7)>0 then / if A(c,7)<=0 then endZ=c-1 starter=1 vor_starter=0 end end end //Berechnung der Zugmasse if starter==1 then time3=datevec(A(beginnZ,1)) time4=datevec(A(endZ,1)) delta_t=etime(time3, time4) delta_v=(A(endZ,3)-A(beginnZ,3)*3.6) // m/s length_F=length(beginnZ:endZ) mittel_F=sum(A(beginnz:endZ,6)/length_F) dm= (delta_t/delta_v) / mittel_F starter=0 end end if dm~=0 then disp(dm) end // end of buggy code end The real Matrix Looks like These: Zeit Distanz Geschwindigkeit 1 Drehzahl Getriebeausgangsleistung [Watt] Zugkraft [N] Beschleunigung [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen aktiv 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 0 0 0 0 1 0 0 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 0 1 0 0 734962.404902 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 1 1 1 0 734962.404971 46476.495 1.70 1059.06 110500 234000 1.04 0 0 1 1 1 1 0 ... Best regards Frieder _______________________________________________ users mailing list users at lists.scilab.org https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DQIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL-uPD6MaElfbx9CXO4IosetysN-0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data From Frieder.Nikolaisen at student.hs-rm.de Thu Oct 6 08:29:19 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Thu, 06 Oct 2016 08:29:19 +0200 Subject: [Scilab-users] [EXTERNAL] !--error 21 In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F71A028@BGS-EX01.auxitrol.ad> References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> <88c52ae3da494eef04ba3c4a8d77d822@mail.student.hs-rm.de> <3A6B7233274DB449A2A0053A47684F953F71A028@BGS-EX01.auxitrol.ad> Message-ID: With the real Code, it's more difficult to predict the first c. Thats why I do use > //start of buggy code > if c>=2 then... to make sure, that c=1 cant Trouble the following code. Am 06.10.2016 08:21, schrieb Carrico, Paul: > Without launching the code, I would say : > C = 1 : 30 > And > A(c-1,3) > > If c = 1 then A(0,3) that is not possible since the index start to 1 > ... no ? > > > -----Message d'origine----- > De?: users [mailto:users-bounces at lists.scilab.org] De la part de > Frieder Nikolaisen Envoy??: jeudi 6 octobre 2016 08:18 ??: Users > mailing list for Scilab Objet?: [EXTERNAL] [Scilab-users] !--error 21 > > Hello everybody, > > I do have a code, I cannot find the mistake. I get the error: > > " if A(c-1,3)==0 then > !--error 21 > ung?ltiger Index. > at line 11 of exec file called by : > exec('M:\CAD\Abteilungen\Praktikanten\Nikolaisen, > Frieder\Fahrdaten\Testprogramm\Archive\test2.sce', -1)" > > My minimal example Code with random Matrix instead of the real used > one: > > //example code > > for c=1:10 > A=rand(10:30) > dm=0 > vor_starter=0 > starter=0 > > //start of buggy code > if c>=2 then > if A(c-1,3)==0 then > if A(c,7)>0 then > beginnZ=c > vor_starter=1 / > end > end > //Endzeile festlegen > if vor_starter==1 then > if A(c-1,7)>0 then / > if A(c,7)<=0 then > endZ=c-1 > starter=1 > vor_starter=0 > end > end > end > > //Berechnung der Zugmasse > if starter==1 then > time3=datevec(A(beginnZ,1)) > time4=datevec(A(endZ,1)) > delta_t=etime(time3, time4) > delta_v=(A(endZ,3)-A(beginnZ,3)*3.6) // m/s > length_F=length(beginnZ:endZ) > mittel_F=sum(A(beginnz:endZ,6)/length_F) > dm= (delta_t/delta_v) / mittel_F > starter=0 > end > end > > if dm~=0 then > disp(dm) > end > > // end of buggy code > > end > > > > The real Matrix Looks like These: > Zeit Distanz Geschwindigkeit 1 Drehzahl Getriebeausgangsleistung > [Watt] Zugkraft [N] Beschleunigung > [m/s^2] Cv-Druck Richtung Lokbremse > anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen Kupplung > bet?tigt Bremsen aktiv > 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 0 0 0 0 1 0 0 > 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 0 1 0 0 > 734962.404902 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 1 1 1 0 > 734962.404971 46476.495 1.70 1059.06 110500 234000 1.04 0 0 1 1 1 1 0 > ... > > > Best regards > Frieder > _______________________________________________ > users mailing list > users at lists.scilab.org > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DQIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL-uPD6MaElfbx9CXO4IosetysN-0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= > > > EXPORT CONTROL : > Cet email ne contient pas de donn?es techniques > This email does not contain technical data > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From shamika.i.nair at gmail.com Thu Oct 6 08:55:57 2016 From: shamika.i.nair at gmail.com (shamikam) Date: Wed, 5 Oct 2016 23:55:57 -0700 (MST) Subject: [Scilab-users] API Error In-Reply-To: References: Message-ID: <1475736957544-4034715.post@n3.nabble.com> This is the entire callOct function for now. extern "C"{ #include "api_scilab.h" #include "Scierror.h" #include "sciprint.h" int callOct(char *fname, unsigned long fname_len) { SciErr sciErr; int iRows = 0; int iCols = 0; int *piAddrChild = NULL; double* listItem =NULL; int a=0; sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddrChild); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } int noItemList = 0; sciErr = getListItemNumber(pvApiCtx, piAddrChild, &noItemList); if(sciErr.iErr) { printError(&sciErr, 0); sciprint("This variable is not a list"); return 0; } sciprint("%d",noItemList); for( a= 1 ;a<=noItemList ; a++) { sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddrChild, a, &iRows, &iCols, &listItem); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } } // Perform further calculations. } } I called callOct- -->c=hypermat([2 3 2 2],1:24); -->callOct(c) I get the same error as mentioned in the first post. The variable browser says c is hm(Mlist). On Scilab console, for type(c), the answer is 17. According to this- https://help.scilab.org/docs/5.5.2/en_US/sci_types.html, 17 is mlist. I tried to get the number of items(matrices) in the mlist. It did not generate the correct number. When I called the function with a list, there were no errors. It did generate the right number of list items. I need the code to work for 3D and higher dimension matrices. Why doesn't the list API functions work for mlist variables? How do I access 3D matrices in c/c++ code? -- View this message in context: http://mailinglists.scilab.org/Scilab-users-API-Error-tp4034704p4034715.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From paul.carrico at free.fr Thu Oct 6 10:51:39 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Thu, 6 Oct 2016 10:51:39 +0200 (CEST) Subject: [Scilab-users] Scilab control after an impossible calculation Message-ID: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi All I?m using Scilab as the interface between my optimizer and my finite element solver(s) and sometimes Scilab stops because of unexpected and impossible calculus (1/x with x = 0 as an example ); obviously Scilab stops (and so the optimization). I?m wondering if it?s possible: - To ask back Scilab a message such as ?hey I crashed because you?re a fool and you?ve not anticipated an impossible calculation !!!? - To get back Scilab control in order to avoid optimization process crash ? I?ve been thinking in affecting a cost function value at %inf for example (not elegant I recognize) I don?t know if I?m understandable enough ? Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Thu Oct 6 11:45:50 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 06 Oct 2016 11:45:50 +0200 Subject: [Scilab-users] [EXTERNAL] !--error 21 In-Reply-To: References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> <88c52ae3da494eef04ba3c4a8d77d822@mail.student.hs-rm.de> <3A6B7233274DB449A2A0053A47684F953F71A028@BGS-EX01.auxitrol.ad> Message-ID: <57F61D4E.1010405@hslmg.de> Hallo Frieder, insert the line disp('################'), c=c,sizeA=size(A) before the problem line if A(c-1,3)==0 then and you will see what happens there. Regards Jens ----------------------------------- Am 06.10.2016 08:29, schrieb Frieder Nikolaisen: > With the real Code, it's more difficult to predict the first c. > > Thats why I do use >> //start of buggy code >> if c>=2 then... > to make sure, that c=1 cant Trouble the following code. > > > Am 06.10.2016 08:21, schrieb Carrico, Paul: >> Without launching the code, I would say : >> C = 1 : 30 >> And >> A(c-1,3) >> >> If c = 1 then A(0,3) that is not possible since the index start to 1 >> ... no ? >> >> >> -----Message d'origine----- >> De : users [mailto:users-bounces at lists.scilab.org] De la part de >> Frieder Nikolaisen Envoy? : jeudi 6 octobre 2016 08:18 ? : Users >> mailing list for Scilab Objet : [EXTERNAL] [Scilab-users] !--error 21 >> >> Hello everybody, >> >> I do have a code, I cannot find the mistake. I get the error: >> >> " if A(c-1,3)==0 then >> !--error 21 >> ung?ltiger Index. >> at line 11 of exec file called by : >> exec('M:\CAD\Abteilungen\Praktikanten\Nikolaisen, >> Frieder\Fahrdaten\Testprogramm\Archive\test2.sce', -1)" >> >> My minimal example Code with random Matrix instead of the real used >> one: >> >> //example code >> >> for c=1:10 >> A=rand(10:30) >> dm=0 >> vor_starter=0 >> starter=0 >> >> //start of buggy code >> if c>=2 then >> if A(c-1,3)==0 then >> if A(c,7)>0 then >> beginnZ=c >> vor_starter=1 / >> end >> end >> //Endzeile festlegen >> if vor_starter==1 then >> if A(c-1,7)>0 then / >> if A(c,7)<=0 then >> endZ=c-1 >> starter=1 >> vor_starter=0 >> end >> end >> end >> >> //Berechnung der Zugmasse >> if starter==1 then >> time3=datevec(A(beginnZ,1)) >> time4=datevec(A(endZ,1)) >> delta_t=etime(time3, time4) >> delta_v=(A(endZ,3)-A(beginnZ,3)*3.6) // m/s >> length_F=length(beginnZ:endZ) >> mittel_F=sum(A(beginnz:endZ,6)/length_F) >> dm= (delta_t/delta_v) / mittel_F >> starter=0 >> end >> end >> >> if dm~=0 then >> disp(dm) >> end >> >> // end of buggy code >> >> end >> >> >> >> The real Matrix Looks like These: >> Zeit Distanz Geschwindigkeit 1 Drehzahl >> Getriebeausgangsleistung >> [Watt] Zugkraft [N] Beschleunigung [m/s^2] Cv-Druck >> Richtung Lokbremse >> anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen >> Kupplung >> bet?tigt Bremsen aktiv >> 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 >> 0 0 0 0 1 0 0 >> 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 >> 0 0 1 0 1 0 0 >> 734962.404902 46476.494 0.00 1059.06 110500 0 0.00 >> 0 0 1 1 1 1 0 >> 734962.404971 46476.495 1.70 1059.06 110500 234000 >> 1.04 0 0 1 1 1 1 0 >> ... >> >> >> Best regards >> Frieder >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DQIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL-uPD6MaElfbx9CXO4IosetysN-0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= >> >> >> >> EXPORT CONTROL : >> Cet email ne contient pas de donn?es techniques >> This email does not contain technical data >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Thu Oct 6 11:48:50 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 06 Oct 2016 11:48:50 +0200 Subject: [Scilab-users] Scilab control after an impossible calculation In-Reply-To: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <57F61E02.7030406@hslmg.de> Try errcatch(). ---------------------------------------------------------------------------- Am 06.10.2016 10:51, schrieb paul.carrico at free.fr: > > Hi All > > I'm using Scilab as the interface between my optimizer and my finite > element solver(s) and sometimes Scilab stops because of unexpected and > impossible calculus (1/x with x = 0 as an example ); obviously Scilab > stops (and so the optimization). > > I'm wondering if it's possible: > > -To ask back Scilab a message such as "hey I crashed because you're a > fool and you've not anticipated an impossible calculation !!!" > > -To get back Scilab control in order to avoid optimization process > crash ? I've been thinking in affecting a cost function value at %inf > for example (not elegant I recognize) > > I don't know if I'm understandable enough ... > > Paul > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Thu Oct 6 10:26:50 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Thu, 6 Oct 2016 08:26:50 +0000 Subject: [Scilab-users] Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern] Message-ID: Hello, > De : paul.carrico at free.fr > Envoy? : mercredi 5 octobre 2016 21:56 > > In attachment is typically a project I'm working on : > determination of peaks and valley on a noisy signal; > Trying to avoid reinventing the wheel, > I had a look on information's and algorithms on internet .... > not so easy topics I was thinking at the first time. I used to work in the X-ray diffraction and fluorescence field, where the detection of peaks is a main concern. All this depends on the signal-to-noise ratio, but we used the following algorithms, Applied one after the other: ? cutting the signal that is below the background noise: in the X-ray field, the noise follows a Poisson statistics, so if you know the background level (determined "manually"), you can eliminate bands where the signal is below bkg + 3*sigma ? Savitzky-Golay algorithm for smoothing and determining the first and second derivative: the peak summit is a local minimum of the 2nd derivative, and the inflection points (i.e. its zeroes) can be used to estimate the peak width and also possibly its location (chord middle) https://commons.wikimedia.org/wiki/File:Savitzky-golay_pic_gaussien_bruite.svg ? eliminating the parasites: in this field, the peaks have a minimum width, so you can remove any detected peak if the first derivative is unexpectedly high. We also used "de-summation", i.e. from a set of peak position (determined automatically or manually), we generate a curve as a sum of "perfect peaks" (Gaussian, Lorentzian, pseudo-Voigt, Pearson-VII etc.) and we adjust the peaks parameters (position, width, shape) to minimise the quadratic difference with the signal (i.e. non-linear regression). I don't know if this is useful in your field, but the Savitzky-Golay algorithm is something widely used and easy to implement (especially if the points are uniformly spaced in x) and if the peak position and width have a physical meaning, de-summation can be powerful. -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From jrafaelbguerra at hotmail.com Thu Oct 6 12:04:00 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 6 Oct 2016 10:04:00 +0000 Subject: [Scilab-users] determination of peaks and valley on a noisy signal Message-ID: Hi Paul, Thanks for sharing the interesting code & link. Please note that for noisy data you may still be able to use your peaks-and-valleys code by filtering the input data beforehand. Depending on the type of noise, Scilab offers different solutions: - Low-Pass filters: if the noise is mainly higher-frequency than the signal - Loess non-linear method (available in Scilab?s CWA toolbox): good to remove outliers - etc. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of paul.carrico at free.fr Sent: Wednesday, October 05, 2016 9:56 PM To: Users mailing list for Scilab > Subject: Re: [Scilab-users] Forum dedicated to Scilab developments -> practical concern Hi In attachment is typically a project I'm working on : determination of peaks and valley on a noisy signal; Trying to avoid reinventing the wheel, I had a look on information's and algorithms on internet .... not so easy topics I was thinking at the first time. Typically a project that can federate people around ... an example among others Nb: the "peaks detector" project is non applicable on noisy signals (while vectorization is quit interresting) Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Thu Oct 6 12:31:31 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Thu, 6 Oct 2016 12:31:31 +0200 (CEST) Subject: [Scilab-users] Scilab control after an impossible calculation In-Reply-To: <57F61E02.7030406@hslmg.de> Message-ID: <1302328249.364415747.1475749891502.JavaMail.root@zimbra5-e1.priv.proxad.net> thanks for the advice well I tried but it does not work as expected ; errcatch seems to be obsolete so I'm testing it with execstr: the warning is not displayed ... why ???? ########################################### mode(0) try x = 0; y = (1/x) if execstr(('y','errcatch') <> 0) then printf("you''re a fool\n"); else printf("Everything is going well\n"); end errclear; end ----- Mail original ----- De: "Jens Simon Strom" ?: "Users mailing list for Scilab" Envoy?: Jeudi 6 Octobre 2016 11:48:50 Objet: Re: [Scilab-users] Scilab control after an impossible calculation Try errcatch (). ---------------------------------------------------------------------------- Am 06.10.2016 10:51, schrieb paul.carrico at free.fr : Hi All I?m using Scilab as the interface between my optimizer and my finite element solver(s) and sometimes Scilab stops because of unexpected and impossible calculus (1/x with x = 0 as an example ); obviously Scilab stops (and so the optimization). I?m wondering if it?s possible: - To ask back Scilab a message such as ?hey I crashed because you?re a fool and you?ve not anticipated an impossible calculation !!!? - To get back Scilab control in order to avoid optimization process crash ? I?ve been thinking in affecting a cost function value at %inf for example (not elegant I recognize) I don?t know if I?m understandable enough ? Paul _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Thu Oct 6 12:32:17 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Thu, 6 Oct 2016 12:32:17 +0200 (CEST) Subject: [Scilab-users] Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern] In-Reply-To: Message-ID: <766769700.364417623.1475749937186.JavaMail.root@zimbra5-e1.priv.proxad.net> thanks for the information and the link Paul ----- Mail original ----- De: "Dang Ngoc Chan, Christophe" ?: "Users mailing list for Scilab" Envoy?: Jeudi 6 Octobre 2016 10:26:50 Objet: [Scilab-users] Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern] Hello, > De : paul.carrico at free.fr > Envoy? : mercredi 5 octobre 2016 21:56 > > In attachment is typically a project I'm working on : > determination of peaks and valley on a noisy signal; > Trying to avoid reinventing the wheel, > I had a look on information's and algorithms on internet .... > not so easy topics I was thinking at the first time. I used to work in the X-ray diffraction and fluorescence field, where the detection of peaks is a main concern. All this depends on the signal-to-noise ratio, but we used the following algorithms, Applied one after the other: ? cutting the signal that is below the background noise: in the X-ray field, the noise follows a Poisson statistics, so if you know the background level (determined "manually"), you can eliminate bands where the signal is below bkg + 3*sigma ? Savitzky-Golay algorithm for smoothing and determining the first and second derivative: the peak summit is a local minimum of the 2nd derivative, and the inflection points (i.e. its zeroes) can be used to estimate the peak width and also possibly its location (chord middle) https://commons.wikimedia.org/wiki/File:Savitzky-golay_pic_gaussien_bruite.svg ? eliminating the parasites: in this field, the peaks have a minimum width, so you can remove any detected peak if the first derivative is unexpectedly high. We also used "de-summation", i.e. from a set of peak position (determined automatically or manually), we generate a curve as a sum of "perfect peaks" (Gaussian, Lorentzian, pseudo-Voigt, Pearson-VII etc.) and we adjust the peaks parameters (position, width, shape) to minimise the quadratic difference with the signal (i.e. non-linear regression). I don't know if this is useful in your field, but the Savitzky-Golay algorithm is something widely used and easy to implement (especially if the points are uniformly spaced in x) and if the peak position and width have a physical meaning, de-summation can be powerful. -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.pageone at googlemail.com Thu Oct 6 12:34:59 2016 From: mike.pageone at googlemail.com (Mike Page) Date: Thu, 6 Oct 2016 11:34:59 +0100 Subject: [Scilab-users] Scilab control after an impossible calculation In-Reply-To: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: Hi Paul, Would Scilab's try-catch block do what you want? For example: for i=1:10; try; disp(1/(i-5)); catch; disp("err"); end; end won't crash when it gets to the divide by zero. This is the more structured way, but you can use execstr with errcatch to do the same thing. HTH Mike. On 6 October 2016 at 09:51, wrote: > Hi All > > > > I?m using Scilab as the interface between my optimizer and my finite > element solver(s) and sometimes Scilab stops because of unexpected and > impossible calculus (1/x with x = 0 as an example ); obviously Scilab stops > (and so the optimization). > > > > I?m wondering if it?s possible: > > - To ask back Scilab a message such as ?hey I crashed because > you?re a fool and you?ve not anticipated an impossible calculation !!!? > > - To get back Scilab control in order to avoid optimization > process crash ? I?ve been thinking in affecting a cost function value at > %inf for example (not elegant I recognize) > > > > I don?t know if I?m understandable enough ? > > > > Paul > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amonmayr at laas.fr Thu Oct 6 12:39:42 2016 From: amonmayr at laas.fr (Antoine Monmayrant) Date: Thu, 06 Oct 2016 12:39:42 +0200 Subject: [Scilab-users] =?utf-8?b?Pz09P3V0Zi04P3E/ICBTY2lsYWIgY29udHJvbCBh?= =?utf-8?q?fter_an_impossible_calculation?= In-Reply-To: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <73da-57f62a00-1b-3d680a40@46993131> Hi Paul, Here are a couple of things you can do: - as already mentioned, try/catch structures can be used to handle problems instead of crashing. - can't you bullet-proof your code? I mean check x!=0 if you have 1/x somewhere in your code. - just change your parametrization to use y=1/x as a parameter instead of x. Basically, you just change all the parameters so that your scilab calculation is safe and you make a small translator (y->x=1/y, ...) to easily navigate from safe parameters to parameters that make sense for the user. We use it a lot in our curve fitting procedures to avoid similar 1/(x=0), acos(x>1), log(x<=0) ... problems. - can't you use constraints in your optimization routine? I think optim and leastsqr can use optional arguments to coerce each parameter in a given range. Hope it helps, Antoine Le Jeudi, Octobre 06, 2016 10:51 CEST, paul.carrico at free.fr a ?crit: > > Hi All > > I?m using Scilab as the interface between my optimizer and my finite element solver(s) and sometimes Scilab stops because of unexpected and impossible calculus (1/x with x = 0 as an example ); obviously Scilab stops (and so the optimization). > > I?m wondering if it?s possible: > - To ask back Scilab a message such as ?hey I crashed because you?re a fool and you?ve not anticipated an impossible calculation !!!? > - To get back Scilab control in order to avoid optimization process crash ? I?ve been thinking in affecting a cost function value at %inf for example (not elegant I recognize) > > I don?t know if I?m understandable enough ? > > Paul From Serge.Steer at inria.fr Thu Oct 6 13:12:00 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Thu, 6 Oct 2016 13:12:00 +0200 Subject: [Scilab-users] Scilab control after an impossible calculation In-Reply-To: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: If you use optim you can set the ind retured arg to -1 in the cost function to say that the function cannot be evaluated at this point. Serge Le 06/10/2016 ? 10:51, paul.carrico at free.fr a ?crit : > > Hi All > > I?m using Scilab as the interface between my optimizer and my finite > element solver(s) and sometimes Scilab stops because of unexpected and > impossible calculus (1/x with x = 0 as an example ); obviously Scilab > stops (and so the optimization). > > I?m wondering if it?s possible: > > -To ask back Scilab a message such as ?hey I crashed because you?re a > fool and you?ve not anticipated an impossible calculation !!!? > > -To get back Scilab control in order to avoid optimization process > crash ? I?ve been thinking in affecting a cost function value at %inf > for example (not elegant I recognize) > > I don?t know if I?m understandable enough ? > > Paul > > > > _______________________________________________ > 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 free.fr Thu Oct 6 13:37:47 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Thu, 6 Oct 2016 13:37:47 +0200 (CEST) Subject: [Scilab-users] Scilab control after an impossible calculation In-Reply-To: Message-ID: <849295837.364647090.1475753867955.JavaMail.root@zimbra5-e1.priv.proxad.net> thanks everybody for the supports Paul ----- Mail original ----- De: "Mike Page" ?: "Users mailing list for Scilab" Envoy?: Jeudi 6 Octobre 2016 12:34:59 Objet: Re: [Scilab-users] Scilab control after an impossible calculation Hi Paul, Would Scilab's try-catch block do what you want? For example: for i=1:10; try; disp(1/(i-5)); catch; disp("err"); end; end won't crash when it gets to the divide by zero. This is the more structured way, but you can use execstr with errcatch to do the same thing. HTH Mike. On 6 October 2016 at 09:51, < paul.carrico at free.fr > wrote: Hi All I?m using Scilab as the interface between my optimizer and my finite element solver(s) and sometimes Scilab stops because of unexpected and impossible calculus (1/x with x = 0 as an example ); obviously Scilab stops (and so the optimization). I?m wondering if it?s possible: - To ask back Scilab a message such as ?hey I crashed because you?re a fool and you?ve not anticipated an impossible calculation !!!? - To get back Scilab control in order to avoid optimization process crash ? I?ve been thinking in affecting a cost function value at %inf for example (not elegant I recognize) I don?t know if I?m understandable enough ? Paul _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frieder.Nikolaisen at student.hs-rm.de Thu Oct 6 15:06:51 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Thu, 06 Oct 2016 15:06:51 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57F61375.1050702@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> Message-ID: <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> Hello, to Jens: ich habe Fortschritte gemacht, bin dennoch nicht zum Ergebnis gekommen. I will write about the problem, in English: 1. Attached are two plots. The 16 line plot shows the Dates. But even with just 16 lines, it's not easy to read, as there are to many Dates ploted. How can I reduce the number? 2. In the plot with 1695 lines, there are no numbers anymore. I used the same code with the same data type, having the 16 first line in common. 3. Which paramter does change the color of plot and date? 4. I have these blue line on the x axis, how can I turn it off? 5. I would like to implement a checkbox, where the user can choose between date and line number. How to print the line number? There are more seconds as lines, so with just chaning the string, it does not fit. Thank you very much for the prevous help. The not running Code: my_handle = scf(100000); clf(my_handle); // Preparing data x=((-A(:,1)+A(A_size(:,1))))*24*3600 //offset, time measured in seconds, FN // x = A(:,1); //Serial Date Number ge?ndert durch FN y2 = A(:,y_2); // ge?ndert durch FN y3 = A(:,y_3) // ge?ndert durch FN drawlater() // demo_viewCode("plotyyy.dem.sce"); // Axis y1 y1=A(:,y_1); // ge?ndert durch FN plot2d(x,y1) xtitle([gettext(string(kT(y_1)) + string(kT(y_2)) + string(kT(y_3)));" "],.. gettext("Serial Date Numbers"),gettext(string(kT(y_1)))); // ge?ndert durch FN // Axis y2 c=color("blue"); na=newaxes(); na.foreground=c; na.font_color=c; plot2d(x,y2,style=c) ylabel(string(kT(y_2)),"color",[0 0 1]) // ge?ndert durch FN na.children(1).children(1).thickness=2; na.filled="off"; na.axes_visible(1)="off"; // na.axes_reverse(2)="on"; na.y_location="middle"; // Axis y3 c=color("red"); na=newaxes(); na.foreground=c; // Axis and ticks color na.font_color=c; // Labels's color plot2d(x,y3,style=c); ylabel(string(kT(y_3)),"color",[1 0 0]) // ge?ndert durch FN na.filled="off"; // Transparent background, letting the first plot appearing na.axes_visible(1)="off"; // Masking the x axis (useless overlay) na.y_location="right"; // Y axis on the right side na.children(1).children(1).thickness=2; // Curve thickness //Secound x axis, by Frieder Nikolaisen supported by Jens Simon Strom via Scilab Mailinglist drawnow() dn=A(:,1) A_size=size(A) fake=zeros(A_size(1,1),1) disp(A_size) dv=datevec(A(:,1)) //dv(:,1)=dv(:,1)-2000//two digits only x=((-A(:,1)+A(A_size(:,1))))*24*3600;//offset,time measured in seconds plot(x,fake) // with date as YY.MM.DD.HH.MM.SS na.filled="off"; // Transparent background, letting the first plot appearing na.axes_visible(1)="off"; // Masking the x axis (useless overlay) na.y_location="right"; // Y axis on the right side na.children(1).children(1).thickness=0; // Curve thickness for k=1:A_size(1,1) //Beschriftung xstring(x(k),x(1),string(round(dv(k,:))')) end // DEMO END // mclose(plotyyy) // endfunction // demo_plotyyy(); // clear demo_plotyyy; // Code von Samuel GOUGEON endet set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') endfunction Best regards Frieder Am 06.10.2016 11:03, schrieb Jens Simon Strom: > Hallo Frieder, > konnte der Ansatz mit xstring() f?r die Zeitachse (s. u.) dein > Problem l?sen? > MfG > Jens > ----------------------- > > Am 04.10.2016 10:38, schrieb Jens Simon Strom: > >> Hallo Frieder, >> I mean a diagram with _one_ y-axis quantified by _one_ numeric >> _scale_. >> >> ?The x-axis could be the automatically generated one showing the >> serial date number, advantageously shortened by an adequate offset. >> The YY.MM.DD.HH.MM.SS information could be accomodated at the bottom >> of the diagram by means of xstring(). The following minimal example >> my explain the approach. >> >> //dummy data >> yr=[2016]*ones(1,5); mh=10*ones(yr); >> >> dy=4*ones(yr); hr=10*ones(yr); mn=11*ones(yr); sd=[41:45]; >> dn=datenum(yr,mh,dy,hr,mn,sd) >> dv=datevec(dn) >> dv(:,1)=dv(:,1)-2000//two digits only >> xdel(); >> x=(dn-dn(1))*24*3600;//offset,time measured in seconds >> y=x;//dummy data >> plot(x,y,'o-') // with date as YY.MM.DD.HH.MM.SS >> for k=1:length(dn)//Beschrift >> xstring(x(k),x(1),string(round(dv(k,:))')) >> end >> >> Kind regards >> Jens >> > > ---------------------------------------------------------------------------------------------------------- >> >> Am 04.10.2016 07:43, schrieb Frieder Nikolaisen: >> >>> Hello togehter, >>> >>> thank you for your answers. I do have to plot again and again for >>> choosing the best time interval. >>> >>> Jens, what do you mean with using a single diagram? A diagram >>> with one x and one y axis? And writing n/10^3 U/min) might look >>> nicer, bit is not solving the problem of having the two needed >>> information on the x axis: Time in YY.MM.DD.HH.MM.SS and the line >>> in the Matrix. >>> >>> Best regards >>> Frieder >>> >>> Am 30.09.2016 16:33, schrieb Jens Simon Strom: >>> >>>> Dear Frieder, >>>> ?My first reflex is to dodge the questions you are asking and >>>> to use a >>>> simpler approach instead: >>>> >>>> ?Call the y-axis 'n/(10^3U/min), P/MW, a/(10m/s^2)' and plot >>>> the >>>> values into one SINGLE diagram over 't/h' which is calculated >>>> as >>>> (T-int(T))*24. Note that dividing the quantity by its unit >>>> gives the >>>> number shown at the axis. This is a widely accepted convention >>>> to draw >>>> axes and clearer than 'P in MW' oder 'P [MW]'. I think the >>>> diagram >>>> would look quite nice. >>>> >>>> ?Regards >>>> ?Jens >>>> ?------------------------------------------------------- >>>> >>>> Am 30.09.2016 13:23, schrieb Frieder Nikolaisen: >>>> >>>>> Dear Jens, >>>>> >>>>> there is not much to be confused about. I have attached my >>>>> Diagramms with that Code but real data. The mininmal example >>>>> is just >>>>> crap, because of the random Matrix A. >>>>> >>>>> The Grafik-Fenster Nummer 100000 is only for choosing the >>>>> Intervall >>>>> of intrest. The 100001 is the detail to look at. It's just >>>>> about a >>>>> vehicle dooing shunting. I will include the possiblilty to >>>>> choose >>>>> the paramater you want to look at. Right now turn per minute >>>>> and >>>>> power arn't that useful. >>>>> >>>>> Best regards >>>>> Frieder >>>>> >>>>> Am 30.09.2016 11:48, schrieb Jens Simon Strom: >>>>> >>>>>> Dear Frieder, >>>>>> It looks like you would like to put plenty of information >>>>>> into >>>>>> one >>>>>> single diagram. This tends to become confusing and >>>>>> difficult to >>>>>> read. >>>>>> It would help your helpers if you enclosed a (manual) >>>>>> sketch how >>>>>> the >>>>>> final result of your visualisation should look like. And >>>>>> perhaps >>>>>> that >>>>>> could trigger you to review the layout of what you plan to >>>>>> plot. >>>>>> Regards >>>>>> Jens >>>> >>>> >>> >> > > ------------------------------------------------------------------------------------ >>>> >>>> >>>>>> Am 30.09.2016 11:27, schrieb Frieder Nikolaisen: >>>>>> >>>>>>> I did forgott one Point: >>>>>>> >>>>>>> My data Looks like: >>>>>>> >>>>>>> Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse >>>>>>> l?sen >>>>>>> Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt >>>>>>> Bremsen >>>>>>> aktiv >>>>>>> >>>>>>> 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 0 0 >>>>>>> 1 0 0 >>>>>>> 0 >>>>>>> 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 0 >>>>>>> 0 1 0 >>>>>>> 0 0 >>>>>>> ... >>>>>>> 04.04.2012 12:13:15.910 46482.9710 15.10 1344.19 0.49 1 1 >>>>>>> 1 1 1 >>>>>>> 0 1 >>>>>>> >>>>>>> I want to plot some paramters over the time. I used >>>>>>> datenum - >>>>>>> but then the Diagramm cant be read easy. How could I >>>>>>> print the >>>>>>> time instead of Serial date number on the axes as well as >>>>>>> the >>>>>>> row number? (plotxxyyy x1=real time in DD MM YY HH MM SS, >>>>>>> x2=row >>>>>>> number and yyy) >>>>>>> >>>>>>> I do read These file in a Matrix, I add some more >>>>>>> paramters and >>>>>>> print: >>>>>>> >>>>>>> Zeit Distanz Geschwindigkeit 1 Drehzahl >>>>>>> Getriebeausgangsleistung [Watt] Zugkraft [N] >>>>>>> Beschleunigung >>>>>>> [m/s^2] Cv-Druck Richtung Lokbremse anlegen Lokbremse >>>>>>> l?sen >>>>>>> Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt >>>>>>> Bremsen >>>>>>> aktiv >>>>>>> 734962.404654 46476.494 0.00 1150.71 141700 0 0.00 0 0 0 >>>>>>> 0 1 0 >>>>>>> 0 >>>>>>> 734962.404900 46476.494 0.00 1059.06 110500 0 0.00 0 0 1 >>>>>>> 0 1 0 >>>>>>> 0 >>>>>>> ... >>>>>>> >>>>>>> For beeing used in a secound Programm. >>>>>>> >>>>>>> Best regards >>>>>>> >>>>>>> -------- Originalnachricht -------- >>>>>>> Betreff: [Scilab-users] plotxxyyy >>>>>>> Datum: 30.09.2016 11:17 >>>>>>> Absender: Frieder Nikolaisen >>>>>>> [1] [1] >>>>>>> Empf?nger: Users mailing list for Scilab >>>>>>> [2] [2] >>>>>>> Antwort an: Users mailing list for Scilab >>>>>>> [3] [3] >>>>>>> >>>>>>> Hello everybody, >>>>>>> >>>>>>> with you help I got my programm so far running pretty >>>>>>> well. Now >>>>>>> I have trouble again with the plotting. I used the >>>>>>> demos_gui >>>>>>> plotyyy, but want now the plotxxyyy. How to implement xx? >>>>>>> I >>>>>>> attach my minimal example with a random Matrix, instead >>>>>>> of the >>>>>>> real one I use. >>>>>>> >>>>>>> This programm will be used at my theses. So I want to do >>>>>>> correct quotes. I am used how to do this a text, but how >>>>>>> is it >>>>>>> done in a programm? >>>>>>> >>>>>>> I do get Errors, if I do not open the example plotyyy - >>>>>>> is this >>>>>>> really necessary? >>>>>>> " plotyyy=uigetfile('plotyyy.dem.sce'); mopen(plotyyy) " >>>>>>> >>>>>>> Best regards >>>>>>> Frieder Nikolaisen >>>>>>> >>>>>>> The minimal Code: >>>>>>> >>>>>>> //Write your callback for Diagramm here >>>>>>> >>>>>>> A=rand(15,50) >>>>>>> >>>>>>> //Dieser Code und geistiges Eigentum von Samuel GOUGEON >>>>>>> wird >>>>>>> ge?ndert und angepasst von Frieder Nikolaisen (FN), >>>>>>> bleibt in >>>>>>> seinen Grundz?gen jedoch erhalten >>>>>>> >>>>>>> // Scilab ( http://www.scilab.org/ [4] [4] ) - This file >>>>>>> is part of >>>>>>> Scilab >>>>>>> // Copyright (C) 2010 Samuel GOUGEON >>>>>>> // Copyright (C) 2010 - DIGITEO - Allan CORNET >>>>>>> // >>>>>>> // This file is released under the 3-clause BSD license. >>>>>>> See >>>>>>> COPYING-BSD. >>>>>>> >>>>>>> function demo_plotyyy() >>>>>>> >>>>>>> plotyyy=uigetfile('plotyyy.dem.sce') // hinzugef?gt von >>>>>>> FN >>>>>>> (changed by Frieder Nikolaisen) >>>>>>> mopen(plotyyy) // hinzugef?gt von FN >>>>>>> >>>>>>> // DEMO START >>>>>>> // A plotyyy() example: >>>>>>> //http://bugzilla.scilab.org/show_bug.cgi?id=6070 [5] [5] >>>>>>> >>>>>>> >>>>>>> my_handle = scf(100000); >>>>>>> clf(my_handle); >>>>>>> >>>>>>> // Preparing data >>>>>>> x = A(:,1); //Serial Date Number ge?ndert durch FN >>>>>>> (changed by >>>>>>> Frieder Nikolaisen) >>>>>>> y2 = A(:,5); //Leistung ge?ndert durch FN >>>>>>> y3 = A(:,7) //Beschleunigung ge?ndert durch FN >>>>>>> >>>>>>> drawlater() >>>>>>> demo_viewCode("plotyyy.dem.sce"); >>>>>>> >>>>>>> // Axis y1 >>>>>>> y1=A(:,4); //Drehzahl ge?ndert durch FN >>>>>>> plot2d(x,y1) >>>>>>> xtitle([gettext("Leistung, Drehzahl und >>>>>>> Beschleunigung");" >>>>>>> "],.. >>>>>>> gettext("Serial Date Numbers"),gettext("Drehzahl in >>>>>>> U/min")); >>>>>>> // ge?ndert durch FN >>>>>>> >>>>>>> // Axis y2 >>>>>>> c=color("blue"); >>>>>>> na=newaxes(); >>>>>>> na.foreground=c; >>>>>>> na.font_color=c; >>>>>>> plot2d(x,y2,style=c) >>>>>>> ylabel("Leistung in Watt","color",[0 0 1]) // ge?ndert >>>>>>> durch >>>>>>> FN >>>>>>> na.children(1).children(1).thickness=2; >>>>>>> na.filled="off"; >>>>>>> na.axes_visible(1)="off"; >>>>>>> // na.axes_reverse(2)="on"; >>>>>>> na.y_location="middle"; >>>>>>> >>>>>>> // Axis y3 >>>>>>> c=color("red"); >>>>>>> na=newaxes(); >>>>>>> na.foreground=c; // Axis and ticks color >>>>>>> na.font_color=c; // Labels's color >>>>>>> plot2d(x,y3,style=c); >>>>>>> ylabel("Beschleunigung in m/s","color",[1 0 0]) // >>>>>>> ge?ndert >>>>>>> durch FN >>>>>>> na.filled="off"; // Transparent background, letting the >>>>>>> first >>>>>>> plot appearing >>>>>>> na.axes_visible(1)="off"; // Masking the x axis (useless >>>>>>> overlay) >>>>>>> na.y_location="right"; // Y axis on the right side >>>>>>> na.children(1).children(1).thickness=2; // Curve >>>>>>> thickness >>>>>>> >>>>>>> drawnow() >>>>>>> >>>>>>> // DEMO END >>>>>>> mclose(plotyyy) >>>>>>> >>>>>>> endfunction >>>>>>> >>>>>>> demo_plotyyy(); >>>>>>> clear demo_plotyyy; >>>>>>> >>>>>>> // Code von Samuel GOUGEON endet >>>>>>> >>>>>>> set(handles.Anzeige, 'string','Ausgangsdiagramm >>>>>>> erstellt') >>>>>>> >>>>>>> _______________________________________________ >>>>>>> users mailing list >>>>>>> users at lists.scilab.org [6] [6] >>>>>>> http://lists.scilab.org/mailman/listinfo/users [7] [7] >>>>>>> >>>>>>> _______________________________________________ >>>>>>> users mailing list >>>>>>> users at lists.scilab.org [8] [8] >>>>>>> http://lists.scilab.org/mailman/listinfo/users [9] [9] >>>>>> >>>>>> _______________________________________________ >>>>>> users mailing list >>>>>> users at lists.scilab.org [10] [10] >>>>>> http://lists.scilab.org/mailman/listinfo/users [11] [11] >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org [12] >>>>> http://lists.scilab.org/mailman/listinfo/users [13] >>>> >>>> Links: >>>> ------ >>>> [1] mailto:Frieder.Nikolaisen at student.hs-rm.de [14] >>>> [2] mailto:users at lists.scilab.org [15] >>>> [3] mailto:users at lists.scilab.org [16] >>>> [4] http://www.scilab.org/ [17] >>>> [5] http://bugzilla.scilab.org/show_bug.cgi?id=6070 [18] >>>> [6] mailto:users at lists.scilab.org [19] >>>> [7] http://lists.scilab.org/mailman/listinfo/users [20] >>>> [8] mailto:users at lists.scilab.org [21] >>>> [9] http://lists.scilab.org/mailman/listinfo/users [22] >>>> [10] mailto:users at lists.scilab.org [23] >>>> [11] http://lists.scilab.org/mailman/listinfo/users [24] >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org [25] >>> http://lists.scilab.org/mailman/listinfo/users [26] > > > > Links: > ------ > [1] mailto:Frieder.Nikolaisen at student.hs-rm.de > [2] mailto:users at lists.scilab.org > [3] mailto:users at lists.scilab.org > [4] http://www.scilab.org/ > [5] http://bugzilla.scilab.org/show_bug.cgi?id=6070 > [6] mailto:users at lists.scilab.org > [7] http://lists.scilab.org/mailman/listinfo/users > [8] mailto:users at lists.scilab.org > [9] http://lists.scilab.org/mailman/listinfo/users > [10] mailto:users at lists.scilab.org > [11] http://lists.scilab.org/mailman/listinfo/users > [12] mailto:users at lists.scilab.org > [13] http://lists.scilab.org/mailman/listinfo/users > [14] mailto:Frieder.Nikolaisen at student.hs-rm.de > [15] mailto:users at lists.scilab.org > [16] mailto:users at lists.scilab.org > [17] http://www.scilab.org/ > [18] http://bugzilla.scilab.org/show_bug.cgi?id=6070 > [19] mailto:users at lists.scilab.org > [20] http://lists.scilab.org/mailman/listinfo/users > [21] mailto:users at lists.scilab.org > [22] http://lists.scilab.org/mailman/listinfo/users > [23] mailto:users at lists.scilab.org > [24] http://lists.scilab.org/mailman/listinfo/users > [25] mailto:users at lists.scilab.org > [26] http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- A non-text attachment was scrubbed... Name: Plot_date_1695_lines.gif Type: image/gif Size: 20020 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plot_date_16_lines.gif Type: image/gif Size: 13970 bytes Desc: not available URL: From Frieder.Nikolaisen at student.hs-rm.de Thu Oct 6 15:18:17 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Thu, 06 Oct 2016 15:18:17 +0200 Subject: [Scilab-users] [EXTERNAL] !--error 21 In-Reply-To: <57F61D4E.1010405@hslmg.de> References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> <88c52ae3da494eef04ba3c4a8d77d822@mail.student.hs-rm.de> <3A6B7233274DB449A2A0053A47684F953F71A028@BGS-EX01.auxitrol.ad> <57F61D4E.1010405@hslmg.de> Message-ID: Hallo Jens, danke sch?n. Die Testmatrix ist Unsinn. Somit wei? ich nun, dass der Fehler im Programm nicht an ?dieser Passage liegt, sondern bereits davor Auftritt. Viele Gr??e Frieder Am 06.10.2016 11:45, schrieb Jens Simon Strom: > Hallo Frieder, > insert the line > > disp('################'), c=c, sizeA=size(A) > > before the problem line > if A(c-1,3)==0 then > > and you will see what happens there. > > Regards > Jens > ----------------------------------- > > Am 06.10.2016 08:29, schrieb Frieder Nikolaisen: > >> With the real Code, it's more difficult to predict the first c. >> >> Thats why I do use >> >>> //start of buggy code >>> if c>=2 then... >> to make sure, that c=1 cant Trouble the following code. >> >> Am 06.10.2016 08:21, schrieb Carrico, Paul: >> >>> Without launching the code, I would say : >>> C = 1 : 30 >>> And >>> A(c-1,3) >>> >>> If c = 1 then A(0,3) that is not possible since the index start >>> to 1 ... no ? >>> >>> -----Message d'origine----- >>> De?: users [mailto:users-bounces at lists.scilab.org [1]] De la >>> part de >>> Frieder Nikolaisen Envoy??: jeudi 6 octobre 2016 08:18 ??: >>> Users >>> mailing list for Scilab Objet?: [EXTERNAL] [Scilab-users] >>> !--error 21 >>> >>> Hello everybody, >>> >>> I do have a code, I cannot find the mistake. I get the error: >>> >>> "??? if A(c-1,3)==0 then >>> ???????????????? !--error 21 >>> ung?ltiger Index. >>> at line????? 11 of exec file called by : >>> exec('M:CADAbteilungenPraktikantenNikolaisen, >>> FriederFahrdatenTestprogrammArchivetest2.sce', -1)" >>> >>> My minimal example Code with random Matrix instead of the real >>> used >>> one: >>> >>> //example code >>> >>> for c=1:10 >>> A=rand(10:30) >>> dm=0 >>> vor_starter=0 >>> starter=0 >>> >>> //start of buggy code >>> if c>=2 then >>> ???? if A(c-1,3)==0 then >>> ???????? if A(c,7)>0 then >>> ???????????? beginnZ=c >>> ???????????? vor_starter=1?? / >>> ???????? end >>> ???? end >>> ???????? //Endzeile festlegen >>> ???? if vor_starter==1 then >>> ???????? if A(c-1,7)>0 then????? / >>> ???????????? if A(c,7)<=0 then >>> ???????????????? endZ=c-1 >>> ???????????????? starter=1 >>> ???????????????? vor_starter=0 >>> ???????????? end >>> ???????? end >>> ???? end >>> >>> ???? //Berechnung der Zugmasse >>> ???? if starter==1 then >>> ???????? time3=datevec(A(beginnZ,1)) >>> ???????? time4=datevec(A(endZ,1)) >>> ???????? delta_t=etime(time3, time4) >>> ???????? delta_v=(A(endZ,3)-A(beginnZ,3)*3.6)???? // >>> m/s >>> ???????? length_F=length(beginnZ:endZ) >>> ???????? mittel_F=sum(A(beginnz:endZ,6)/length_F) >>> ???????? dm= (delta_t/delta_v) / mittel_F >>> ???????? starter=0 >>> ???? end >>> end >>> >>> if dm~=0 then >>> ???? disp(dm) >>> end >>> >>> // end of buggy code >>> >>> end >>> >>> The real Matrix Looks like These: >>> Zeit??? Distanz??? Geschwindigkeit 1??? Drehzahl??? >>> Getriebeausgangsleistung >>> [Watt]??? Zugkraft [N]??? Beschleunigung [m/s^2]??? >>> Cv-Druck??? Richtung??????? Lokbremse >>> anlegen??? Lokbremse l?sen??? Zugbremse anlegen??? >>> Zugbremse l?sen??? Kupplung >>> bet?tigt??? Bremsen? aktiv >>> 734962.404654??? 46476.494??? 0.00??? 1150.71??? >>> 141700??? 0??? 0.00??? 0??? 0??? 0??? 0??? >>> 1??? 0??? 0 >>> 734962.404900??? 46476.494??? 0.00??? 1059.06??? >>> 110500??? 0??? 0.00??? 0??? 0??? 1??? 0??? >>> 1??? 0??? 0 >>> 734962.404902??? 46476.494??? 0.00??? 1059.06??? >>> 110500??? 0??? 0.00??? 0??? 0??? 1??? 1??? >>> 1??? 1??? 0 >>> 734962.404971??? 46476.495??? 1.70??? 1059.06??? >>> 110500??? 234000??? 1.04??? 0??? 0??? 1??? >>> 1??? 1??? 1??? 0 >>> ... >>> >>> Best regards >>> Frieder >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org [2] >>> >>> >> > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DQIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL-uPD6MaElfbx9CXO4IosetysN-0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= >>> [3] >>> >>> EXPORT CONTROL : >>> Cet email ne contient pas de donn?es techniques >>> This email does not contain technical data >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org [4] >>> http://lists.scilab.org/mailman/listinfo/users [5] >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org [6] >> http://lists.scilab.org/mailman/listinfo/users [7] > > > > Links: > ------ > [1] mailto:users-bounces at lists.scilab.org > [2] mailto:users at lists.scilab.org > [3] > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DQIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL-uPD6MaElfbx9CXO4IosetysN-0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= > [4] mailto:users at lists.scilab.org > [5] http://lists.scilab.org/mailman/listinfo/users > [6] mailto:users at lists.scilab.org > [7] http://lists.scilab.org/mailman/listinfo/users From clement.david at scilab-enterprises.com Thu Oct 6 15:27:59 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Thu, 06 Oct 2016 15:27:59 +0200 Subject: [Scilab-users] [EXTERNAL] !--error 21 In-Reply-To: References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> <88c52ae3da494eef04ba3c4a8d77d822@mail.student.hs-rm.de> <3A6B7233274DB449A2A0053A47684F953F71A028@BGS-EX01.auxitrol.ad> <57F61D4E.1010405@hslmg.de> Message-ID: <1475760479.2154.17.camel@scilab-enterprises.com> Hallo Frieder, Most of this ML readers / writers are not german speaker, could you please use english next time ? Thanks, -- Cl?ment Le jeudi 06 octobre 2016 ? 15:18 +0200, Frieder Nikolaisen a ?crit?: > Hallo Jens, > > danke sch?n. Die Testmatrix ist Unsinn. Somit wei? ich nun, dass der? > Fehler im Programm nicht an ?dieser Passage liegt, sondern bereits davor? > Auftritt. > > Viele Gr??e > Frieder > > > > > Am 06.10.2016 11:45, schrieb Jens Simon Strom: > > > > Hallo Frieder, > > ?insert the line > > > > ?disp('################'), c=c, sizeA=size(A) > > > > before the problem line > > ?if A(c-1,3)==0 then > > > > and you will see what happens there. > > > > Regards > > Jens > > ----------------------------------- > > > > Am 06.10.2016 08:29, schrieb Frieder Nikolaisen: > > > > > > > > With the real Code, it's more difficult to predict the first c. > > > > > > Thats why I do use > > > > > > > > > > > //start of buggy code > > > > if c>=2 then... > > > to make sure, that c=1 cant Trouble the following code. > > > > > > Am 06.10.2016 08:21, schrieb Carrico, Paul: > > > > > > > > > > > Without launching the code, I would say : > > > > C = 1 : 30 > > > > And > > > > A(c-1,3) > > > > > > > > If c = 1 then A(0,3) that is not possible since the index start > > > > to 1 ... no ? > > > > > > > > -----Message d'origine----- > > > > De?: users [mailto:users-bounces at lists.scilab.org [1]] De la > > > > part de > > > > Frieder Nikolaisen Envoy??: jeudi 6 octobre 2016 08:18 ??: > > > > Users > > > > mailing list for Scilab Objet?: [EXTERNAL] [Scilab-users] > > > > !--error 21 > > > > > > > > Hello everybody, > > > > > > > > I do have a code, I cannot find the mistake. I get the error: > > > > > > > > "??? if A(c-1,3)==0 then > > > > ???????????????? !--error 21 > > > > ung?ltiger Index. > > > > at line????? 11 of exec file called by : > > > > exec('M:CADAbteilungenPraktikantenNikolaisen, > > > > FriederFahrdatenTestprogrammArchivetest2.sce', -1)" > > > > > > > > My minimal example Code with random Matrix instead of the real > > > > used > > > > one: > > > > > > > > //example code > > > > > > > > for c=1:10 > > > > A=rand(10:30) > > > > dm=0 > > > > vor_starter=0 > > > > starter=0 > > > > > > > > //start of buggy code > > > > if c>=2 then > > > > ???? if A(c-1,3)==0 then > > > > ???????? if A(c,7)>0 then > > > > ???????????? beginnZ=c > > > > ???????????? vor_starter=1?? / > > > > ???????? end > > > > ???? end > > > > ???????? //Endzeile festlegen > > > > ???? if vor_starter==1 then > > > > ???????? if A(c-1,7)>0 then????? / > > > > ???????????? if A(c,7)<=0 then > > > > ???????????????? endZ=c-1 > > > > ???????????????? starter=1 > > > > ???????????????? vor_starter=0 > > > > ???????????? end > > > > ???????? end > > > > ???? end > > > > > > > > ???? //Berechnung der Zugmasse > > > > ???? if starter==1 then > > > > ???????? time3=datevec(A(beginnZ,1)) > > > > ???????? time4=datevec(A(endZ,1)) > > > > ???????? delta_t=etime(time3, time4) > > > > ???????? delta_v=(A(endZ,3)-A(beginnZ,3)*3.6)???? // > > > > m/s > > > > ???????? length_F=length(beginnZ:endZ) > > > > ???????? mittel_F=sum(A(beginnz:endZ,6)/length_F) > > > > ???????? dm= (delta_t/delta_v) / mittel_F > > > > ???????? starter=0 > > > > ???? end > > > > end > > > > > > > > if dm~=0 then > > > > ???? disp(dm) > > > > end > > > > > > > > // end of buggy code > > > > > > > > end > > > > > > > > The real Matrix Looks like These: > > > > Zeit??? Distanz??? Geschwindigkeit 1??? Drehzahl??? > > > > Getriebeausgangsleistung > > > > [Watt]??? Zugkraft [N]??? Beschleunigung [m/s^2]??? > > > > Cv-Druck??? Richtung??????? Lokbremse > > > > anlegen??? Lokbremse l?sen??? Zugbremse anlegen??? > > > > Zugbremse l?sen??? Kupplung > > > > bet?tigt??? Bremsen? aktiv > > > > 734962.404654??? 46476.494??? 0.00??? 1150.71??? > > > > 141700??? 0??? 0.00??? 0??? 0??? 0??? 0??? > > > > 1??? 0??? 0 > > > > 734962.404900??? 46476.494??? 0.00??? 1059.06??? > > > > 110500??? 0??? 0.00??? 0??? 0??? 1??? 0??? > > > > 1??? 0??? 0 > > > > 734962.404902??? 46476.494??? 0.00??? 1059.06??? > > > > 110500??? 0??? 0.00??? 0??? 0??? 1??? 1??? > > > > 1??? 1??? 0 > > > > 734962.404971??? 46476.495??? 1.70??? 1059.06??? > > > > 110500??? 234000??? 1.04??? 0??? 0??? 1??? > > > > 1??? 1??? 1??? 0 > > > > ... > > > > > > > > Best regards > > > > Frieder > > > > _______________________________________________ > > > > users mailing list > > > > users at lists.scilab.org [2] > > > > > > > > > > > > > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DQ > > IGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL- > > uPD6MaElfbx9CXO4IosetysN-0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= > > > > > > > > > > > [3] > > > > > > > > EXPORT CONTROL : > > > > Cet email ne contient pas de donn?es techniques > > > > This email does not contain technical data > > > > _______________________________________________ > > > > users mailing list > > > > users at lists.scilab.org [4] > > > > http://lists.scilab.org/mailman/listinfo/users [5] > > > > > > _______________________________________________ > > > users mailing list > > > users at lists.scilab.org [6] > > > http://lists.scilab.org/mailman/listinfo/users [7] > > > > > > > > Links: > > ------ > > [1] mailto:users-bounces at lists.scilab.org > > [2] mailto:users at lists.scilab.org > > [3] > > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users& > > d=DQIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz > > --8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL-uPD6MaElfbx9CXO4IosetysN- > > 0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= > > [4] mailto:users at lists.scilab.org > > [5] http://lists.scilab.org/mailman/listinfo/users > > [6] mailto:users at lists.scilab.org > > [7] http://lists.scilab.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Frieder.Nikolaisen at student.hs-rm.de Thu Oct 6 15:57:02 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Thu, 06 Oct 2016 15:57:02 +0200 Subject: [Scilab-users] [EXTERNAL] !--error 21 In-Reply-To: <1475760479.2154.17.camel@scilab-enterprises.com> References: <1529410015.358132844.1475611649252.JavaMail.root@zimbra5-e1.priv.proxad.net> <1475656188.10762.24.camel@scilab-enterprises.com> <88c52ae3da494eef04ba3c4a8d77d822@mail.student.hs-rm.de> <3A6B7233274DB449A2A0053A47684F953F71A028@BGS-EX01.auxitrol.ad> <57F61D4E.1010405@hslmg.de> <1475760479.2154.17.camel@scilab-enterprises.com> Message-ID: <487b81c4a799a0997cee31740e0b9c52@mail.student.hs-rm.de> Hello Cl?ment, yes. I do translate: >> danke sch?n. Die Testmatrix ist Unsinn. Somit wei? ich nun, dass der >> Fehler im Programm nicht an ?dieser Passage liegt, sondern bereits >> davor >> Auftritt. Thank you. I had a mistake in the random Matrix. It's now clear, that my mistake isn't in this code, but earlier in the program. Regards Am 06.10.2016 15:27, schrieb Cl?ment David: > Hallo Frieder, > > Most of this ML readers / writers are not german speaker, could you > please use english next time ? > > Thanks, > > -- > Cl?ment > > Le jeudi 06 octobre 2016 ? 15:18 +0200, Frieder Nikolaisen a ?crit?: >> Hallo Jens, >> >> danke sch?n. Die Testmatrix ist Unsinn. Somit wei? ich nun, dass >> der? >> Fehler im Programm nicht an ?dieser Passage liegt, sondern bereits >> davor? >> Auftritt. >> >> Viele Gr??e >> Frieder >> >> >> >> >> Am 06.10.2016 11:45, schrieb Jens Simon Strom: >> > >> > Hallo Frieder, >> > ?insert the line >> > >> > ?disp('################'), c=c, sizeA=size(A) >> > >> > before the problem line >> > ?if A(c-1,3)==0 then >> > >> > and you will see what happens there. >> > >> > Regards >> > Jens >> > ----------------------------------- >> > >> > Am 06.10.2016 08:29, schrieb Frieder Nikolaisen: >> > >> > > >> > > With the real Code, it's more difficult to predict the first c. >> > > >> > > Thats why I do use >> > > >> > > > >> > > > //start of buggy code >> > > > if c>=2 then... >> > > to make sure, that c=1 cant Trouble the following code. >> > > >> > > Am 06.10.2016 08:21, schrieb Carrico, Paul: >> > > >> > > > >> > > > Without launching the code, I would say : >> > > > C = 1 : 30 >> > > > And >> > > > A(c-1,3) >> > > > >> > > > If c = 1 then A(0,3) that is not possible since the index >> start >> > > > to 1 ... no ? >> > > > >> > > > -----Message d'origine----- >> > > > De?: users [mailto:users-bounces at lists.scilab.org [1]] De la >> > > > part de >> > > > Frieder Nikolaisen Envoy??: jeudi 6 octobre 2016 08:18 ??: >> > > > Users >> > > > mailing list for Scilab Objet?: [EXTERNAL] [Scilab-users] >> > > > !--error 21 >> > > > >> > > > Hello everybody, >> > > > >> > > > I do have a code, I cannot find the mistake. I get the error: >> > > > >> > > > "??? if A(c-1,3)==0 then >> > > > ???????????????? !--error 21 >> > > > ung?ltiger Index. >> > > > at line????? 11 of exec file called by : >> > > > exec('M:CADAbteilungenPraktikantenNikolaisen, >> > > > FriederFahrdatenTestprogrammArchivetest2.sce', -1)" >> > > > >> > > > My minimal example Code with random Matrix instead of the real >> > > > used >> > > > one: >> > > > >> > > > //example code >> > > > >> > > > for c=1:10 >> > > > A=rand(10:30) >> > > > dm=0 >> > > > vor_starter=0 >> > > > starter=0 >> > > > >> > > > //start of buggy code >> > > > if c>=2 then >> > > > ???? if A(c-1,3)==0 then >> > > > ???????? if A(c,7)>0 then >> > > > ???????????? beginnZ=c >> > > > ???????????? vor_starter=1?? / >> > > > ???????? end >> > > > ???? end >> > > > ???????? //Endzeile festlegen >> > > > ???? if vor_starter==1 then >> > > > ???????? if A(c-1,7)>0 then????? / >> > > > ???????????? if A(c,7)<=0 then >> > > > ???????????????? endZ=c-1 >> > > > ???????????????? starter=1 >> > > > ???????????????? vor_starter=0 >> > > > ???????????? end >> > > > ???????? end >> > > > ???? end >> > > > >> > > > ???? //Berechnung der Zugmasse >> > > > ???? if starter==1 then >> > > > ???????? time3=datevec(A(beginnZ,1)) >> > > > ???????? time4=datevec(A(endZ,1)) >> > > > ???????? delta_t=etime(time3, time4) >> > > > ???????? delta_v=(A(endZ,3)-A(beginnZ,3)*3.6)???? // >> > > > m/s >> > > > ???????? length_F=length(beginnZ:endZ) >> > > > ???????? mittel_F=sum(A(beginnz:endZ,6)/length_F) >> > > > ???????? dm= (delta_t/delta_v) / mittel_F >> > > > ???????? starter=0 >> > > > ???? end >> > > > end >> > > > >> > > > if dm~=0 then >> > > > ???? disp(dm) >> > > > end >> > > > >> > > > // end of buggy code >> > > > >> > > > end >> > > > >> > > > The real Matrix Looks like These: >> > > > Zeit??? Distanz??? Geschwindigkeit 1??? Drehzahl??? >> > > > Getriebeausgangsleistung >> > > > [Watt]??? Zugkraft [N]??? Beschleunigung [m/s^2]??? >> > > > Cv-Druck??? Richtung??????? Lokbremse >> > > > anlegen??? Lokbremse l?sen??? Zugbremse anlegen??? >> > > > Zugbremse l?sen??? Kupplung >> > > > bet?tigt??? Bremsen? aktiv >> > > > 734962.404654??? 46476.494??? 0.00??? 1150.71??? >> > > > 141700??? 0??? 0.00??? 0??? 0??? 0??? 0??? >> > > > 1??? 0??? 0 >> > > > 734962.404900??? 46476.494??? 0.00??? 1059.06??? >> > > > 110500??? 0??? 0.00??? 0??? 0??? 1??? 0??? >> > > > 1??? 0??? 0 >> > > > 734962.404902??? 46476.494??? 0.00??? 1059.06??? >> > > > 110500??? 0??? 0.00??? 0??? 0??? 1??? 1??? >> > > > 1??? 1??? 0 >> > > > 734962.404971??? 46476.495??? 1.70??? 1059.06??? >> > > > 110500??? 234000??? 1.04??? 0??? 0??? 1??? >> > > > 1??? 1??? 1??? 0 >> > > > ... >> > > > >> > > > Best regards >> > > > Frieder >> > > > _______________________________________________ >> > > > users mailing list >> > > > users at lists.scilab.org [2] >> > > > >> > > > >> > > >> > >> > >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users&d=DQ >> > >> IGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz--8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL- >> > >> uPD6MaElfbx9CXO4IosetysN-0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= >> > > >> > > > >> > > > [3] >> > > > >> > > > EXPORT CONTROL : >> > > > Cet email ne contient pas de donn?es techniques >> > > > This email does not contain technical data >> > > > _______________________________________________ >> > > > users mailing list >> > > > users at lists.scilab.org [4] >> > > > http://lists.scilab.org/mailman/listinfo/users [5] >> > > >> > > _______________________________________________ >> > > users mailing list >> > > users at lists.scilab.org [6] >> > > http://lists.scilab.org/mailman/listinfo/users [7] >> > >> > >> > >> > Links: >> > ------ >> > [1] mailto:users-bounces at lists.scilab.org >> > [2] mailto:users at lists.scilab.org >> > [3] >> > >> > >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.scilab.org_mailman_listinfo_users& >> > d=DQIGaQ&c=0hKVUfnuoBozYN8UvxPA-w&r=4TCz >> > >> --8bXfJhZZvIxJAemAJyz7Vfx78XvgYu3LN7eLo&m=nlCd0TGhAve5QECL-uPD6MaElfbx9CXO4IosetysN- >> > 0&s=zqTXVWWgu1x-XetICW1PCKDY9fcNeZZPL0ByDWVhwdo&e= >> > [4] mailto:users at lists.scilab.org >> > [5] http://lists.scilab.org/mailman/listinfo/users >> > [6] mailto:users at lists.scilab.org >> > [7] 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 j.s.strom at hslmg.de Thu Oct 6 18:20:28 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 06 Oct 2016 18:20:28 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> Message-ID: <57F679CC.4010209@hslmg.de> Hallo Frieder, You ask many questions in one post. 1: You just divide the (numerical) time interval into an adequate number of points (which can be neatly accommodated) with linspace or ':' and plot the corresponding time text colums via a for-loop. There is no need that 'text times' coincide with measured data. They only should be placed at the correct locations. 3:You may not be familiar with how to get quick help from Scilab: Just highlight the command plot2d or style here and go to the help pages. 4: Highlight newaxes, foreground 5: I would postpone integrating a checkbox until everything else is to your satisfaction. The rest of #5 is perhaps answered by #1. General remarks * Do not ask many questions simultaneously. Attack them one by one. You make it easier for yourself and the helpers. * Accompany your questions by short examples which omit irrelevant 'ornaments'. The code you really write with the variables you really use is less appropriate in most cases. * Begin to polish the results (color, line types, fonts, fontsize, etc.) only as the last step in your work. At the beginning accept what Scilab delivers to you. * Work the help pages. My painful experience is that the polishing job often consumes more time (and nerves) than the technical problem itself. Scilab is far from intuitive in that respect. Kind regards, Jens ---------------------------------------------- Am 06.10.2016 15:06, schrieb Frieder Nikolaisen: > Hello, > > to Jens: ich habe Fortschritte gemacht, bin dennoch nicht zum Ergebnis > gekommen. > > I will write about the problem, in English: > > 1. Attached are two plots. The 16 line plot shows the Dates. But even > with just 16 lines, it's not easy to read, as there are to many Dates > ploted. How can I reduce the number? > 2. In the plot with 1695 lines, there are no numbers anymore. I used > the same code with the same data type, having the 16 first line in > common. > 3. Which paramter does change the color of plot and date? > 4. I have these blue line on the x axis, how can I turn it off? > 5. I would like to implement a checkbox, where the user can choose > between date and line number. How to print the line number? There are > more seconds as lines, so with just chaning the string, it does not fit. > > Thank you very much for the prevous help. > > > The not running Code: > > my_handle = scf(100000); > clf(my_handle); > > // Preparing data > x=((-A(:,1)+A(A_size(:,1))))*24*3600 //offset, time measured in > seconds, FN > // x = A(:,1); //Serial Date Number ge?ndert durch FN > y2 = A(:,y_2); // ge?ndert durch FN > y3 = A(:,y_3) // ge?ndert durch FN > > > drawlater() > // demo_viewCode("plotyyy.dem.sce"); > > // Axis y1 > y1=A(:,y_1); // ge?ndert durch FN > plot2d(x,y1) > xtitle([gettext(string(kT(y_1)) + string(kT(y_2)) + > string(kT(y_3)));" "],.. > gettext("Serial Date Numbers"),gettext(string(kT(y_1)))); // > ge?ndert durch FN > > // Axis y2 > c=color("blue"); > na=newaxes(); > na.foreground=c; > na.font_color=c; > plot2d(x,y2,style=c) > ylabel(string(kT(y_2)),"color",[0 0 1]) // ge?ndert durch FN > na.children(1).children(1).thickness=2; > na.filled="off"; > na.axes_visible(1)="off"; > // na.axes_reverse(2)="on"; > na.y_location="middle"; > > // Axis y3 > c=color("red"); > na=newaxes(); > na.foreground=c; // Axis and ticks color > na.font_color=c; // Labels's color > plot2d(x,y3,style=c); > ylabel(string(kT(y_3)),"color",[1 0 0]) // ge?ndert durch FN > na.filled="off"; // Transparent background, > letting the first plot appearing > na.axes_visible(1)="off"; // Masking the x axis > (useless overlay) > na.y_location="right"; // Y axis on the right side > na.children(1).children(1).thickness=2; // Curve thickness > > //Secound x axis, by Frieder Nikolaisen supported by Jens Simon > Strom via Scilab Mailinglist > > drawnow() > > dn=A(:,1) > A_size=size(A) > fake=zeros(A_size(1,1),1) > disp(A_size) > dv=datevec(A(:,1)) > //dv(:,1)=dv(:,1)-2000//two digits only > x=((-A(:,1)+A(A_size(:,1))))*24*3600;//offset,time measured in > seconds > plot(x,fake) // with date as YY.MM.DD.HH.MM.SS > na.filled="off"; // Transparent background, > letting the first plot appearing > na.axes_visible(1)="off"; // Masking the x axis > (useless overlay) > na.y_location="right"; // Y axis on the right side > na.children(1).children(1).thickness=0; // Curve thickness > for k=1:A_size(1,1) //Beschriftung > xstring(x(k),x(1),string(round(dv(k,:))')) > end > > > // DEMO END > // mclose(plotyyy) > > // endfunction > > // demo_plotyyy(); > // clear demo_plotyyy; > > // Code von Samuel GOUGEON endet > > set(handles.Anzeige, 'string','Ausgangsdiagramm erstellt') > > endfunction > > Best regards > Frieder > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Thu Oct 6 19:56:46 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 6 Oct 2016 19:56:46 +0200 Subject: [Scilab-users] Scilab control after an impossible calculation In-Reply-To: <1302328249.364415747.1475749891502.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <1302328249.364415747.1475749891502.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <57F6905E.4040605@free.fr> Le 06/10/2016 12:31, paul.carrico at free.fr a ?crit : > thanks for the advice > > well I tried but it does not work as expected ; errcatch seems to be > obsolete so I'm testing it with execstr: the warning is not displayed > ... why ???? Try / catch / end was very buggy in Scilab 5. Scilab 6 efficiently fixes all (or at least most of) reported errors-handling errors. It is now reliable. It is one of the great reliefs provided by Scilab 6. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Thu Oct 6 21:23:17 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Thu, 06 Oct 2016 12:23:17 -0700 Subject: [Scilab-users] Scilab control after an impossible calculation In-Reply-To: References: <1695201020.364037264.1475743899649.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <1475781797.2813.128.camel@Servo> For that matter, you can pass a vector of infemums and supremums for each element of the vector you're optimizing. (and +inf and -inf work, for things that don't matter). As long as you can optimize within a rectilinear space then you can easily dodge the "bad" values. It's in the help for optim. On Thu, 2016-10-06 at 13:12 +0200, Serge Steer wrote: > If you use optim you can set the ind retured arg to -1 in the cost > function to say that the function cannot be evaluated at this point. > > Serge > > Le 06/10/2016 ? 10:51, paul.carrico at free.fr a ?crit : > > > Hi All > > > > > > > > I?m using Scilab as the interface between my optimizer and my finite > > element solver(s) and sometimes Scilab stops because of unexpected > > and impossible calculus (1/x with x = 0 as an example ); obviously > > Scilab stops (and so the optimization). > > > > > > > > I?m wondering if it?s possible: > > > > - To ask back Scilab a message such as ?hey I crashed > > because you?re a fool and you?ve not anticipated an impossible > > calculation !!!? > > > > - To get back Scilab control in order to avoid optimization > > process crash ? I?ve been thinking in affecting a cost function > > value at %inf for example (not elegant I recognize) > > > > > > > > I don?t know if I?m understandable enough ? > > > > > > > > Paul > > > > > > > > > > _______________________________________________ > > 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 -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From j.s.strom at hslmg.de Thu Oct 6 21:28:50 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 06 Oct 2016 21:28:50 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57F679CC.4010209@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> Message-ID: <57F6A5F2.4000709@hslmg.de> *Edit in #3* Am 06.10.2016 18:20, schrieb Jens Simon Strom: > Hallo Frieder, > You ask many questions in one post. > > 1: You just divide the (numerical) time interval into an adequate > number of points (which can be neatly accommodated) with linspace or > ':' and plot the corresponding time text colums via a for-loop. There > is no need that 'text times' coincide with measured data. They only > should be placed at the correct locations. > > 3:You may not be familiar with how to get quick help from Scilab: Just > highlight the command 'plot2d' or 'style' here and go to the help > pages*by right mouse click.* > > 4: Highlight newaxes, foreground > > 5: I would postpone integrating a checkbox until everything else is to > your satisfaction. The rest of #5 is perhaps answered by #1. > > General remarks > > * Do not ask many questions simultaneously. Attack them one by one. > You make it easier for yourself and the helpers. > * Accompany your questions by short examples which omit irrelevant > 'ornaments'. The code you really write with the variables you > really use is less appropriate in most cases. > * Begin to polish the results (color, line types, fonts, fontsize, > etc.) only as the last step in your work. At the beginning accept > what Scilab delivers to you. > * Work the help pages. > > My painful experience is that the polishing job often consumes more > time (and nerves) than the technical problem itself. Scilab is far > from intuitive in that respect. > > Kind regards, Jens > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Thu Oct 6 21:57:27 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Thu, 06 Oct 2016 12:57:27 -0700 Subject: [Scilab-users] Plot format changes Message-ID: <1475783847.2813.133.camel@Servo> So, I have some code that works all right, it works all right but not exactly quite*: errbar(time(ixg) / sampleRate, .. demodulator.eqData.idealPulse(ix), pv, pv); gfig.children(1).children(1).clip_state = 'on'; gfig.children(1).children(1).segs_color = 4; This has worked for me splendedly for years, but there's something about the data that I'm running through it today that makes it error out, reporting that !--error 999 'clip_state' property does not exist for this handle. Is there something about the errbar function that would cause this thing to not HAVE a clip_state? When I look at 'gfig', gfig.children(1) does have a clip_state -- but that's not where that data object should be. (just FYI it's printing out a horribly complicated plot to debug an algorithm -- it's a plot with 55 sub-plots, each one keeping track of one version of the algorithm, all of which are running in parallel.) * Name that tune. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From sgougeon at free.fr Thu Oct 6 23:13:52 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 6 Oct 2016 23:13:52 +0200 Subject: [Scilab-users] Plot format changes In-Reply-To: <1475783847.2813.133.camel@Servo> References: <1475783847.2813.133.camel@Servo> Message-ID: <57F6BE90.3070202@free.fr> Le 06/10/2016 21:57, Tim Wescott a ?crit : > So, I have some code that works all right, it works all right but not > exactly quite*: > > errbar(time(ixg) / sampleRate, .. > demodulator.eqData.idealPulse(ix), pv, pv); > > gfig.children(1).children(1).clip_state = 'on'; > gfig.children(1).children(1).segs_color = 4; > > This has worked for me splendedly for years, but there's something about > the data that I'm running through it today that makes it error out, > reporting that > > !--error 999 > 'clip_state' property does not exist for this handle. . Where and how is gfig defined? From Tim at Wescottdesign.com Fri Oct 7 00:14:34 2016 From: Tim at Wescottdesign.com (Tim Wescott) Date: Thu, 06 Oct 2016 15:14:34 -0700 Subject: [Scilab-users] Plot format changes Message-ID: (Sent previously just to Samuel by mistake) drawlater(); gfig = gcf (); drawnow(); Sent from my Verizon 4G LTE smartphone -------- Original message -------- From: Samuel Gougeon Date: 10/6/16 2:13 PM (GMT-08:00) To: tim at wescottdesign.com, Users mailing list for Scilab Subject: Re: [Scilab-users] Plot format changes Le 06/10/2016 21:57, Tim Wescott a ?crit : > So, I have some code that works all right, it works all right but not > exactly quite*: > >????? errbar(time(ixg) / sampleRate, .. >????????????????? demodulator.eqData.idealPulse(ix), pv, pv); > >????? gfig.children(1).children(1).clip_state = 'on'; >????? gfig.children(1).children(1).segs_color = 4; > > This has worked for me splendedly for years, but there's something about > the data that I'm running through it today that makes it error out, > reporting that > > !--error 999 > 'clip_state' property does not exist for this handle. . Where and how is gfig defined? -------------- next part -------------- An HTML attachment was scrubbed... URL: From shamika.i.nair at gmail.com Fri Oct 7 13:41:54 2016 From: shamika.i.nair at gmail.com (Shamika Mohanan) Date: Fri, 7 Oct 2016 17:11:54 +0530 Subject: [Scilab-users] Building macros Message-ID: Hello, I'm developing a toolbox in Scilab 5.5.0. I'm trying to build the macros in a toolbox using tbx_build_macros function. The macros folder has around 220 .sci functions. When I build the toolbox, only 128 functions are built automatically. The toolbox build stops here. There are many cpp functions in sci_gateway folder. These cpp functions are not compiled at all. There are no errors in the remaining .sci or cpp functions. Is there a limit to the number of functions that can be built using tbx_build_macros? Regards, Shamika -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Fri Oct 7 10:50:18 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 7 Oct 2016 08:50:18 +0000 Subject: [Scilab-users] Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern] Message-ID: Hello, > De : paul.carrico at free.fr > Envoy? : jeudi 6 octobre 2016 12:32 > > thanks for the information and the link I updated the source code on the following page https://commons.wikimedia.org/wiki/File:Savitzky-golay_pic_gaussien_bruite.svg (vectorised, faster). Concerning the use of the Savitzky-Golay algorithm itself, once the algorithm is applied, something like band = (sign(Ysecond (1:$-1)).*sign(Ysecond (2:$))==1) will give you where the second derivative sign changes, i.e. the bands where a peak or a valley lie, and find(band) will give you the indices. Then, you can search the min or the max in each band (on the smoothed data) which should give you the position of the peaks and valeys. I suggest to test several width of the window for each set of data (the degree of the polynomial should always be 3 IMHO) too let your brain finally decide what is a peak/valley and what is not. HTH -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From paul.carrico at free.fr Fri Oct 7 14:37:41 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Fri, 7 Oct 2016 14:37:41 +0200 (CEST) Subject: [Scilab-users] Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern] In-Reply-To: Message-ID: <942423385.368853199.1475843861797.JavaMail.root@zimbra5-e1.priv.proxad.net> Thanks Christophe for the "coup de main" (i.e for the help) I started to have a look on it in order to determine how I can use it in my project; the main goal remains to include such tool in optimization loops involving a fully "automatic" search (one path of reflexion among others) In a more general way, thanks to the community for the previous exchanges Paul ----- Mail original ----- De: "Dang Ngoc Chan, Christophe" ?: "Users mailing list for Scilab" Envoy?: Vendredi 7 Octobre 2016 10:50:18 Objet: Re: [Scilab-users] Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern] Hello, > De : paul.carrico at free.fr > Envoy? : jeudi 6 octobre 2016 12:32 > > thanks for the information and the link I updated the source code on the following page https://commons.wikimedia.org/wiki/File:Savitzky-golay_pic_gaussien_bruite.svg (vectorised, faster). Concerning the use of the Savitzky-Golay algorithm itself, once the algorithm is applied, something like band = (sign(Ysecond (1:$-1)).*sign(Ysecond (2:$))==1) will give you where the second derivative sign changes, i.e. the bands where a peak or a valley lie, and find(band) will give you the indices. Then, you can search the min or the max in each band (on the smoothed data) which should give you the position of the peaks and valeys. I suggest to test several width of the window for each set of data (the degree of the polynomial should always be 3 IMHO) too let your brain finally decide what is a peak/valley and what is not. HTH -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Christophe.Dang at sidel.com Fri Oct 7 11:40:35 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 7 Oct 2016 09:40:35 +0000 Subject: [Scilab-users] TR: Peaks and valleys [was: Forum dedicated to Scilab developments -> practical concern] Message-ID: Small error > De : Dang Ngoc Chan, Christophe > Envoy? : vendredi 7 octobre 2016 10:50 > > band = (sign(Ysecond (1:$-1)).*sign(Ysecond (2:$))==1) It's of course minus one band = (sign(Ysecond (1:$-1)).*sign(Ysecond (2:$))==-1) Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From sgougeon at free.fr Fri Oct 7 20:46:46 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 7 Oct 2016 20:46:46 +0200 Subject: [Scilab-users] Building macros In-Reply-To: References: Message-ID: <57F7ED96.10905@free.fr> Hello, Le 07/10/2016 13:41, Shamika Mohanan a ?crit : > Hello, > > I'm developing a toolbox in Scilab 5.5.0. > > I'm trying to build the macros in a toolbox using tbx_build_macros > function. The macros folder has around 220 .sci functions. When I > build the toolbox, only 128 functions are built automatically. The > toolbox build stops here. There are many cpp functions in sci_gateway > folder. These cpp functions are not compiled at all. There are no > errors in the remaining .sci or cpp functions. > > Is there a limit to the number of functions that can be built using > tbx_build_macros? . AFAIK no Compiling a macro does not require that functions called in it exist at the compiling time: function test() my_random_function_name() endfunction can be compiled even before my_random_function_name() is defined. >When I build the toolbox, only 128 functions are built automatically. The toolbox build stops here. How do you get aware of this? Is there an error, with a message, or another output information? Despite 128 ==2^7, i don't think that t is a "magic number" with respect to macros compilation. With Scilab 6, only macros whose code has been modified since the previous compilation are recompiled, and then the related .bin files are updated. For other ones, the existing .bin files are kept, so their former creation date is unchanged. Regards Samuel Gougeon From shamika.i.nair at gmail.com Sat Oct 8 07:01:49 2016 From: shamika.i.nair at gmail.com (shamikam) Date: Fri, 7 Oct 2016 22:01:49 -0700 (MST) Subject: [Scilab-users] Building macros In-Reply-To: <57F7ED96.10905@free.fr> References: <57F7ED96.10905@free.fr> Message-ID: <1475902909305-4034754.post@n3.nabble.com> When I run toolbox builder, this is the message I get now- -->mode(-1); Building macros... -- Creation of [Imagelib] (Macros) -- genlib: Processing file: imhmin.sci No error is raised. Please note imhmin.sci is the 129th function. I know 128 functions have been built as the corresponding bin file is present for the first 128 functions. The c++ functions have not been compiled as the .so file was not generated. Is there any other way to automatically load .sci files? Shamika -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Building-macros-tp4034745p4034754.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Sat Oct 8 15:19:06 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 8 Oct 2016 15:19:06 +0200 Subject: [Scilab-users] Building macros In-Reply-To: <1475902909305-4034754.post@n3.nabble.com> References: <57F7ED96.10905@free.fr> <1475902909305-4034754.post@n3.nabble.com> Message-ID: <57F8F24A.6070107@free.fr> Le 08/10/2016 07:01, shamikam a ?crit : > When I run toolbox builder, this is the message I get now- > > -->mode(-1); > Building macros... > -- Creation of [Imagelib] (Macros) -- > genlib: Processing file: imhmin.sci > > No error is raised. Please note imhmin.sci is the 129th function. I know 128 > functions have been built as the corresponding bin file is present for the > first 128 functions. The c++ functions have not been compiled as the .so > file was not generated. > > Is there any other way to automatically load .sci files? . Yes, you may use getd(): https://help.scilab.org/docs/6.0.0/en_US/getd.html Samuel From p.muehlmann at gmail.com Sat Oct 8 23:43:27 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Sat, 8 Oct 2016 23:43:27 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57F6A5F2.4000709@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> Message-ID: Dear Frieder, I understand following: You want to plot 3 graphs into one diagram. Basically each graph has it's own x and y axis. Since for two graphs the x-axis are the same, you want to have a diagram with two x-axis and three y-axis Please find a code snipplet that will create such a diagram. Best regards, Philipp clc();clear('all'); x1 = linspace(1,10,10);x2 = linspace(0,100,101);x3 = x1; y1 = linspace(1,10,10);y2 = sin(x2);y3 = sqrt(x1); drawlater() plot2d(x1, y1);a1 = gca();a1.x_location = "bottom";a1.y_location = "left";a1.margins = [0.2,0.2,0.2,0.2] // Axis y2 a2=newaxes();c=color("blue");plot2d(x2,y2,style = c);a2.font_color=c;a2.foreground=c; a2.filled="off";a2.x_location="bottom";a2.y_location="right";a2.margins = [0.2,0.2,0.2,0.1]; // shift axis relative to graphic windowa2.data_bounds = [0,-2.;100,2]; // change axis bounds, so that graph is nicely placed in plotted area // Axis y3 a3=newaxes();c=color("red");plot2d(x3,y3,style = c);a3.font_color=c;a3.foreground=c;a3.filled="off";a3.x_location="bottom"; a3.y_location="left"; a3.data_bounds = [0,1;10,4];a3.margins = [0.134 0.2 0.2 0.2]; // display x3 to check overlapping of x1 and x3 tics;// if overlapping is good enough, than hide x3a3.axes_visible(1)="off"; drawnow() 2016-10-06 21:28 GMT+02:00 Jens Simon Strom : > *Edit in #3* > Am 06.10.2016 18:20, schrieb Jens Simon Strom: > > Hallo Frieder, > You ask many questions in one post. > > 1: You just divide the (numerical) time interval into an adequate number > of points (which can be neatly accommodated) with linspace or ':' and plot > the corresponding time text colums via a for-loop. There is no need that > 'text times' coincide with measured data. They only should be placed at the > correct locations. > > 3:You may not be familiar with how to get quick help from Scilab: Just > highlight the command 'plot2d' or 'style' here and go to the help pages* > by right mouse click.* > > 4: Highlight newaxes, foreground > > 5: I would postpone integrating a checkbox until everything else is to > your satisfaction. The rest of #5 is perhaps answered by #1. > > General remarks > > - Do not ask many questions simultaneously. Attack them one by one. > You make it easier for yourself and the helpers. > - Accompany your questions by short examples which omit irrelevant > 'ornaments'. The code you really write with the variables you really use is > less appropriate in most cases. > - Begin to polish the results (color, line types, fonts, fontsize, > etc.) only as the last step in your work. At the beginning accept what > Scilab delivers to you. > - Work the help pages. > > My painful experience is that the polishing job often consumes more time > (and nerves) than the technical problem itself. Scilab is far from > intuitive in that respect. > > Kind regards, Jens > > > > > > _______________________________________________ > 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 Frieder.Nikolaisen at student.hs-rm.de Sun Oct 9 01:04:25 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Sun, 9 Oct 2016 01:04:25 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> Message-ID: <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> Dear Philipp, thank you, thats great. I will try it at work on monday. Actually, I do have three plots sharing a common x axis and having three different y axis. Why I do want to have two x axis is, to show to different times on x. Once in secound, once in line of document. Best regards Frieder Am 08.10.2016 um 23:43 schrieb Philipp M?hlmann: > Dear Frieder, > > I understand following: > > You want to plot 3 graphs into one diagram. > > Basically each graph has it's own x and y axis. > > Since for two graphs the x-axis are the same, you want to have a > diagram with two x-axis and three y-axis > > Please find a code snipplet that will create such a diagram. > > Best regards, > Philipp > clc(); > clear('all'); > > x1 = linspace(1,10,10); > x2 = linspace(0,100,101); > x3 = x1; > > y1 = linspace(1,10,10); > y2 = sin(x2); > y3 = sqrt(x1); > > drawlater() > > plot2d(x1, y1); > a1 = gca(); > a1.x_location = "bottom"; > a1.y_location = "left"; > a1.margins = [0.2,0.2,0.2,0.2] > > // Axis y2 > > a2=newaxes(); > c=color("blue"); > plot2d(x2,y2,style = c); > a2.font_color=c; > a2.foreground=c; > > a2.filled="off"; > a2.x_location="bottom"; > a2.y_location="right"; > a2.margins = [0.2,0.2,0.2,0.1]; // shift axis relative to graphic window > a2.data_bounds = [0,-2.;100,2]; // change axis bounds, so that graph is nicely placed in plotted area > > // Axis y3 > > a3=newaxes(); > c=color("red"); > plot2d(x3,y3,style = c); > a3.font_color=c; > a3.foreground=c; > a3.filled="off"; > a3.x_location="bottom"; > a3.y_location="left"; > > a3.data_bounds = [0,1;10,4]; > a3.margins = [0.134 0.2 0.2 0.2]; > > // display x3 to check overlapping of x1 and x3 tics; > // if overlapping is good enough, than hide x3 > a3.axes_visible(1)="off"; > > drawnow() > > > > > > > > > 2016-10-06 21:28 GMT+02:00 Jens Simon Strom >: > > *Edit in #3* > Am 06.10.2016 18:20, schrieb Jens Simon Strom: >> Hallo Frieder, >> You ask many questions in one post. >> >> 1: You just divide the (numerical) time interval into an >> adequate number of points (which can be neatly accommodated) with >> linspace or ':' and plot the corresponding time text colums via a >> for-loop. There is no need that 'text times' coincide with >> measured data. They only should be placed at the correct locations. >> >> 3:You may not be familiar with how to get quick help from Scilab: >> Just highlight the command 'plot2d' or 'style' here and go to the >> help pages*by right mouse click.* >> >> 4: Highlight newaxes, foreground >> >> 5: I would postpone integrating a checkbox until everything else >> is to your satisfaction. The rest of #5 is perhaps answered by #1. >> >> General remarks >> >> * Do not ask many questions simultaneously. Attack them one by >> one. You make it easier for yourself and the helpers. >> * Accompany your questions by short examples which omit >> irrelevant 'ornaments'. The code you really write with the >> variables you really use is less appropriate in most cases. >> * Begin to polish the results (color, line types, fonts, >> fontsize, etc.) only as the last step in your work. At the >> beginning accept what Scilab delivers to you. >> * Work the help pages. >> >> My painful experience is that the polishing job often consumes >> more time (and nerves) than the technical problem itself. Scilab >> is far from intuitive in that respect. >> >> Kind regards, Jens >> >> > > > _______________________________________________ > 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. > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Sun Oct 9 02:58:49 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Sun, 9 Oct 2016 02:58:49 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> Message-ID: OK. Please find attached a sample that might help you. Note: It is possible to draw only an axis without showing the corresponding data. Hence: One can create some "fake" or "foo" data not displaying them, but showing the corresponding axis. so using this principle, you can draw as many axes as you like..and place them where you like. clc();clear('all'); // all datashare same x axis// example: there are 1000 datapointsx1 = linspace(1,1000,1000); // each graph has it's own y-axisy1 = x1;y2 = 200*sin(1/20 * x1);y3 = sqrt(x1); // create fake x-values for y-axisfake_x = zeros(1,length(x1));y1_min = 0; // min-value for y1-axisy1_max = 100; // max value for y1 axis y2_min = -2; // min-value for y2-axisy2_max = 2; // max value for y2 axis y3_min = 10; // min-value for y3-axisy3_max = 20; // max value for y3 axis // create 2nd x-axis// example: the 1000 datapoints has been taken in 60 secondsx2_min = 0;x2_max = 60;dx2 = x2_max - x2_min + 1x2 = linspace(x2_min,x2_max,dx2); // create fake data for x2 axisfake_y = zeros(1,length(x2)); f = figure();f.background = 8; drawlater() plot2d(x1, y1,1);plot2d(x1, y2,2);plot2d(x1, y3,5);a = gca()a.axes_visible(2)="off"; a.margins = [0.2 0.2 0.2 0.2]; // create y1 axisa1 = newaxes();plot2d(fake_x, y1); // for fake_x = 0 creates a line on the y1-axis // therefore the fake data are not visiblea1.children.children.visible = 'off'; // hide fake graph if nesessary to only show the axesa1.data_bounds = [0,y1_min;1,y1_max]; // make x-coordinate start at 0 so that fake data aling with y-axisa1.axes_visible(1)="off";a1.filled="off";a1.y_location="left";a1.margins = [0.2 0.2 0.2 0.2]; // create y2 axisa2 = newaxes();c=color("blue");a2.font_color=c;a2.foreground=c;plot2d(fake_x, y2,c); // for fake_x = 0 creates a line on the y2-axis // therefore the fake data are not visiblea2.children.children.visible = 'off'; // hide fake graph if nesessary to only show the axesa2.data_bounds = [0,y2_min;1,y2_max]; // set x-min to "0"...x_max does not matter, since x-axis won't be showna2.axes_visible(1)="off";a2.filled="off";a2.y_location="left";a2.margins = [0.1 0.2 0.2 0.2]; // create y3 axisa3 = newaxes();c=color("red");a3.font_color=c;a3.foreground=c;plot2d(fake_x, y3,c); // for fake_x = 0 creates a line on the y3-axis // therefore the fake data are not visiblea3.children.children.visible = 'off'; // hide fake graph if nesessary to only show the axesa3.data_bounds = [0,y3_min;1,y3_max]; // set x-min to "0"...x_max does not matter, since x-axis won't be showna3.axes_visible(1)="off";a3.filled="off";a3.y_location="right";a3.margins = [0.1 0.2 0.2 0.2];a3.axes_reverse = ["on","off","off"]; // reverse x3 axis, since it is on the right side // create 2nd x-axis a4 = newaxes();c=color("black");a4.font_color=c;a4.foreground=c;plot2d(x2, fake_y,c); // for fake_y = 0 creates a line on the x2-axis // therefore the fake data are not visiblea4.children.children.visible = 'off'; // hide fake graph if nesessary to only show the axesa4.data_bounds = [min(x2),0;max(x2),1]; a4.axes_visible(2)="off";a4.filled="off";a4.x_location="bottom";a4.margins = [0.2 0.2 0.2 0.1]; drawnow() 2016-10-09 1:04 GMT+02:00 Frieder Nikolaisen < Frieder.Nikolaisen at student.hs-rm.de>: > Dear Philipp, > > thank you, thats great. I will try it at work on monday. Actually, I do > have three plots sharing a common x axis and having three different y axis. > Why I do want to have two x axis is, to show to different times on x. Once > in secound, once in line of document. > > Best regards > > Frieder > > > Am 08.10.2016 um 23:43 schrieb Philipp M?hlmann: > > Dear Frieder, > > I understand following: > > You want to plot 3 graphs into one diagram. > > Basically each graph has it's own x and y axis. > > Since for two graphs the x-axis are the same, you want to have a diagram > with two x-axis and three y-axis > > Please find a code snipplet that will create such a diagram. > > Best regards, > Philipp > > clc();clear('all'); > x1 = linspace(1,10,10);x2 = linspace(0,100,101);x3 = x1; > y1 = linspace(1,10,10);y2 = sin(x2);y3 = sqrt(x1); > drawlater() > plot2d(x1, y1);a1 = gca();a1.x_location = "bottom";a1.y_location = "left";a1.margins = [0.2,0.2,0.2,0.2] > // Axis y2 > a2=newaxes();c=color("blue");plot2d(x2,y2,style = c);a2.font_color=c;a2.foreground=c; > a2.filled="off";a2.x_location="bottom";a2.y_location="right";a2.margins = [0.2,0.2,0.2,0.1]; // shift axis relative to graphic windowa2.data_bounds = [0,-2.;100,2]; // change axis bounds, so that graph is nicely placed in plotted area > // Axis y3 > a3=newaxes();c=color("red");plot2d(x3,y3,style = c);a3.font_color=c;a3.foreground=c;a3.filled="off";a3.x_location="bottom"; a3.y_location="left"; > a3.data_bounds = [0,1;10,4];a3.margins = [0.134 0.2 0.2 0.2]; > // display x3 to check overlapping of x1 and x3 tics;// if overlapping is good enough, than hide x3a3.axes_visible(1)="off"; > drawnow() > > > > > > > > > > 2016-10-06 21:28 GMT+02:00 Jens Simon Strom : > >> *Edit in #3* >> Am 06.10.2016 18:20, schrieb Jens Simon Strom: >> >> Hallo Frieder, >> You ask many questions in one post. >> >> 1: You just divide the (numerical) time interval into an adequate number >> of points (which can be neatly accommodated) with linspace or ':' and plot >> the corresponding time text colums via a for-loop. There is no need that >> 'text times' coincide with measured data. They only should be placed at the >> correct locations. >> >> 3:You may not be familiar with how to get quick help from Scilab: Just >> highlight the command 'plot2d' or 'style' here and go to the help pages* >> by right mouse click.* >> >> 4: Highlight newaxes, foreground >> >> 5: I would postpone integrating a checkbox until everything else is to >> your satisfaction. The rest of #5 is perhaps answered by #1. >> >> General remarks >> >> - Do not ask many questions simultaneously. Attack them one by one. >> You make it easier for yourself and the helpers. >> - Accompany your questions by short examples which omit irrelevant >> 'ornaments'. The code you really write with the variables you really use is >> less appropriate in most cases. >> - Begin to polish the results (color, line types, fonts, fontsize, >> etc.) only as the last step in your work. At the beginning accept what >> Scilab delivers to you. >> - Work the help pages. >> >> My painful experience is that the polishing job often consumes more time >> (and nerves) than the technical problem itself. Scilab is far from >> intuitive in that respect. >> >> Kind regards, Jens >> >> >> >> >> >> _______________________________________________ >> 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. > > > _______________________________________________ > users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > 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 sgougeon at free.fr Sun Oct 9 10:49:05 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 9 Oct 2016 10:49:05 +0200 Subject: [Scilab-users] Plot format changes In-Reply-To: References: Message-ID: <57FA0481.9090004@free.fr> Le 07/10/2016 00:11, Tim Wescott a ?crit : > I should add that even here it works through about a dozen iterations > before it fails -- it's definitely data dependant somehow. . Even if we had access to data and to the full explicit context, a transient error would be difficult to track and fix. I don't think that errbar() is specifically involved. However, with Scilab 6.0, the assignment segs.clip_state = 'on'; does not work: "clipgrf" is assigned instead. It is a bug, but i don't think it can explain the error you are reporting. Which Scilab version are you using? -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Oct 9 11:33:07 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 9 Oct 2016 11:33:07 +0200 Subject: [Scilab-users] Plot format changes In-Reply-To: <57FA0481.9090004@free.fr> References: <57FA0481.9090004@free.fr> Message-ID: <57FA0ED3.9090809@free.fr> Le 09/10/2016 10:49, Samuel Gougeon a ?crit : > > However, with Scilab 6.0, the assignment segs.clip_state = 'on'; does > not work: > "clipgrf" is assigned instead. It is a bug, but i don't think it can > explain the error you are reporting. . Actually, it is not a bug: assigning .clip_state="on" is taken into account only if .clip_box is already defined and not [] -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Oct 9 11:35:06 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 9 Oct 2016 11:35:06 +0200 Subject: [Scilab-users] Plot format changes In-Reply-To: <1475783847.2813.133.camel@Servo> References: <1475783847.2813.133.camel@Servo> Message-ID: <57FA0F4A.8030306@free.fr> Le 06/10/2016 21:57, Tim Wescott a ?crit : > So, I have some code that works all right, it works all right but not > exactly quite*: > > errbar(time(ixg) / sampleRate, .. > demodulator.eqData.idealPulse(ix), pv, pv); > > gfig.children(1).children(1).clip_state = 'on'; . You must define an explicit non empty .clip_box=[...] before switching to .clip_state = 'on'; Otherwise the .clip_state remains to the "clipgrf" mode. From p.muehlmann at gmail.com Mon Oct 10 09:04:48 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Mon, 10 Oct 2016 09:04:48 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> Message-ID: Dear Frieder, one more comment. Instead of using "foo"-data, it might be more useful to plot each graph several times. Otherwise the y-axes are not assosiated with the data and you have to take more care about them. e.g.: // display all graph on first x-axis plot2d(x1,y1); // and hide the y1-axis plot2d(x1,y2); // and hide the y2-axis plot2d(x1,y3); // and hide the y3-axis // plot the y-axis assosiated with the corresponding data plot2d(x1,y1); // and hide the graph and the x1-axis and shift y1 to desired locaion plot2d(x1,y2); // and hide the graph and the x1-axis and shift y2 to desired locaion plot2d(x1,y3); // and hide the graph and the x1-axis and shift y3 to desired locaion // plot the x2-axis assosiated with the corresponding data plot2d(x2,y1); // and hide the graph and the y1-axis and shift x2 to desired locaion best regards, Philipp 2016-10-09 2:58 GMT+02:00 Philipp M?hlmann : > OK. > > Please find attached a sample that might help you. > > Note: > It is possible to draw only an axis without showing the corresponding data. > Hence: One can create some "fake" or "foo" data not displaying them, but > showing the corresponding axis. > > so using this principle, you can draw as many axes as you like..and place > them where you like. > > clc();clear('all'); > // all datashare same x axis// example: there are 1000 datapointsx1 = linspace(1,1000,1000); > // each graph has it's own y-axisy1 = x1;y2 = 200*sin(1/20 * x1);y3 = sqrt(x1); > // create fake x-values for y-axisfake_x = zeros(1,length(x1));y1_min = 0; // min-value for y1-axisy1_max = 100; // max value for y1 axis > y2_min = -2; // min-value for y2-axisy2_max = 2; // max value for y2 axis > y3_min = 10; // min-value for y3-axisy3_max = 20; // max value for y3 axis > // create 2nd x-axis// example: the 1000 datapoints has been taken in 60 secondsx2_min = 0;x2_max = 60;dx2 = x2_max - x2_min + 1x2 = linspace(x2_min,x2_max,dx2); > // create fake data for x2 axisfake_y = zeros(1,length(x2)); > f = figure();f.background = 8; > drawlater() > plot2d(x1, y1,1);plot2d(x1, y2,2);plot2d(x1, y3,5);a = gca()a.axes_visible(2)="off"; a.margins = [0.2 0.2 0.2 0.2]; > // create y1 axisa1 = newaxes();plot2d(fake_x, y1); // for fake_x = 0 creates a line on the y1-axis > // therefore the fake data are not visiblea1.children.children.visible = 'off'; // hide fake graph if nesessary to only show the axesa1.data_bounds = [0,y1_min;1,y1_max]; // make x-coordinate start at 0 so that fake data aling with y-axisa1.axes_visible(1)="off";a1.filled="off";a1.y_location="left";a1.margins = [0.2 0.2 0.2 0.2]; > // create y2 axisa2 = newaxes();c=color("blue");a2.font_color=c;a2.foreground=c;plot2d(fake_x, y2,c); // for fake_x = 0 creates a line on the y2-axis > // therefore the fake data are not visiblea2.children.children.visible = 'off'; // hide fake graph if nesessary to only show the axesa2.data_bounds = [0,y2_min;1,y2_max]; // set x-min to "0"...x_max does not matter, since x-axis won't be showna2.axes_visible(1)="off";a2.filled="off";a2.y_location="left";a2.margins = [0.1 0.2 0.2 0.2]; > // create y3 axisa3 = newaxes();c=color("red");a3.font_color=c;a3.foreground=c;plot2d(fake_x, y3,c); // for fake_x = 0 creates a line on the y3-axis > // therefore the fake data are not visiblea3.children.children.visible = 'off'; // hide fake graph if nesessary to only show the axesa3.data_bounds = [0,y3_min;1,y3_max]; // set x-min to "0"...x_max does not matter, since x-axis won't be showna3.axes_visible(1)="off";a3.filled="off";a3.y_location="right";a3.margins = [0.1 0.2 0.2 0.2];a3.axes_reverse = ["on","off","off"]; // reverse x3 axis, since it is on the right side > // create 2nd x-axis > a4 = newaxes();c=color("black");a4.font_color=c;a4.foreground=c;plot2d(x2, fake_y,c); // for fake_y = 0 creates a line on the x2-axis > // therefore the fake data are not visiblea4.children.children.visible = 'off'; // hide fake graph if nesessary to only show the axesa4.data_bounds = [min(x2),0;max(x2),1]; a4.axes_visible(2)="off";a4.filled="off";a4.x_location="bottom";a4.margins = [0.2 0.2 0.2 0.1]; > drawnow() > > > > 2016-10-09 1:04 GMT+02:00 Frieder Nikolaisen hs-rm.de>: > >> Dear Philipp, >> >> thank you, thats great. I will try it at work on monday. Actually, I do >> have three plots sharing a common x axis and having three different y axis. >> Why I do want to have two x axis is, to show to different times on x. Once >> in secound, once in line of document. >> >> Best regards >> >> Frieder >> >> >> Am 08.10.2016 um 23:43 schrieb Philipp M?hlmann: >> >> Dear Frieder, >> >> I understand following: >> >> You want to plot 3 graphs into one diagram. >> >> Basically each graph has it's own x and y axis. >> >> Since for two graphs the x-axis are the same, you want to have a diagram >> with two x-axis and three y-axis >> >> Please find a code snipplet that will create such a diagram. >> >> Best regards, >> Philipp >> >> clc();clear('all'); >> x1 = linspace(1,10,10);x2 = linspace(0,100,101);x3 = x1; >> y1 = linspace(1,10,10);y2 = sin(x2);y3 = sqrt(x1); >> drawlater() >> plot2d(x1, y1);a1 = gca();a1.x_location = "bottom";a1.y_location = "left";a1.margins = [0.2,0.2,0.2,0.2] >> // Axis y2 >> a2=newaxes();c=color("blue");plot2d(x2,y2,style = c);a2.font_color=c;a2.foreground=c; >> a2.filled="off";a2.x_location="bottom";a2.y_location="right";a2.margins = [0.2,0.2,0.2,0.1]; // shift axis relative to graphic windowa2.data_bounds = [0,-2.;100,2]; // change axis bounds, so that graph is nicely placed in plotted area >> // Axis y3 >> a3=newaxes();c=color("red");plot2d(x3,y3,style = c);a3.font_color=c;a3.foreground=c;a3.filled="off";a3.x_location="bottom"; a3.y_location="left"; >> a3.data_bounds = [0,1;10,4];a3.margins = [0.134 0.2 0.2 0.2]; >> // display x3 to check overlapping of x1 and x3 tics;// if overlapping is good enough, than hide x3a3.axes_visible(1)="off"; >> drawnow() >> >> >> >> >> >> >> >> >> >> 2016-10-06 21:28 GMT+02:00 Jens Simon Strom : >> >>> *Edit in #3* >>> Am 06.10.2016 18:20, schrieb Jens Simon Strom: >>> >>> Hallo Frieder, >>> You ask many questions in one post. >>> >>> 1: You just divide the (numerical) time interval into an adequate >>> number of points (which can be neatly accommodated) with linspace or ':' >>> and plot the corresponding time text colums via a for-loop. There is no >>> need that 'text times' coincide with measured data. They only should be >>> placed at the correct locations. >>> >>> 3:You may not be familiar with how to get quick help from Scilab: Just >>> highlight the command 'plot2d' or 'style' here and go to the help pages* >>> by right mouse click.* >>> >>> 4: Highlight newaxes, foreground >>> >>> 5: I would postpone integrating a checkbox until everything else is to >>> your satisfaction. The rest of #5 is perhaps answered by #1. >>> >>> General remarks >>> >>> - Do not ask many questions simultaneously. Attack them one by one. >>> You make it easier for yourself and the helpers. >>> - Accompany your questions by short examples which omit irrelevant >>> 'ornaments'. The code you really write with the variables you really use is >>> less appropriate in most cases. >>> - Begin to polish the results (color, line types, fonts, fontsize, >>> etc.) only as the last step in your work. At the beginning accept what >>> Scilab delivers to you. >>> - Work the help pages. >>> >>> My painful experience is that the polishing job often consumes more time >>> (and nerves) than the technical problem itself. Scilab is far from >>> intuitive in that respect. >>> >>> Kind regards, Jens >>> >>> >>> >>> >>> >>> _______________________________________________ >>> 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. >> >> >> _______________________________________________ >> users mailing listusers at lists.scilab.orghttp://lists.scilab.org/mailman/listinfo/users >> >> >> >> _______________________________________________ >> 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. > -- 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 Frieder.Nikolaisen at student.hs-rm.de Mon Oct 10 13:38:01 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Mon, 10 Oct 2016 13:38:01 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> Message-ID: <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> Dear Philipp, thanks for you help. I tried to adopt your Code to my programm. No success. There is a prolbem I should have metioned eralier. The time between each datapoint has a different time period. So I cant print the y-axis over the time and add a a secound x axis for the line of document. I might stick to the plotxyyy. Best regards Frieder Am 10.10.2016 09:04, schrieb Philipp M?hlmann: > Dear Frieder, > > one more comment. > > Instead of using "foo"-data, it might be more useful to plot each > graph several times. > > Otherwise the y-axes are not assosiated with the data and you have to > take more care about them. > > e.g.: > > // display all graph on first x-axis > > plot2d(x1,y1);??? // and hide the y1-axis > > plot2d(x1,y2);??? // and hide the y2-axis > plot2d(x1,y3);??? // and hide the y3-axis > > // plot the y-axis assosiated with the corresponding data > > plot2d(x1,y1);??? // and hide the graph and the x1-axis and shift > y1 to desired locaion > plot2d(x1,y2);??? // and hide the graph and the x1-axis and shift > y2 to desired locaion > plot2d(x1,y3);??? // and hide the graph and the x1-axis and shift > y3 to desired locaion > > // plot the x2-axis assosiated with the corresponding data > > plot2d(x2,y1);??? // and hide the graph and the y1-axis and shift > x2 to desired locaion > > best regards, > > Philipp > > 2016-10-09 2:58 GMT+02:00 Philipp M?hlmann [7]>: > >> OK. >> >> Please find attached a sample that might help you. >> >> Note: >> It is possible to draw only an axis without showing the >> corresponding data. >> Hence: One can create some "fake" or "foo" data not displaying them, >> but showing the corresponding axis. >> >> so using this principle, you can draw as many axes as you like..and >> place them where you like. >> >> clc(); >> clear(all); >> >> // all datashare same x axis >> // example: there are 1000 datapoints >> x1 = linspace(1,1000,1000); >> >> // each graph has its own y-axis >> y1 = x1; >> y2 = 200*sin(1/20 * x1); >> y3 = sqrt(x1); >> >> // create fake x-values for y-axis >> fake_x = zeros(1,length(x1)); >> y1_min = 0; // min-value for y1-axis >> y1_max = 100; // max value for y1 axis >> >> y2_min = -2; // min-value for y2-axis >> y2_max = 2; // max value for y2 axis >> >> y3_min = 10; // min-value for y3-axis >> y3_max = 20; // max value for y3 axis >> >> // create 2nd x-axis >> // example: the 1000 datapoints has been taken in 60 seconds >> x2_min = 0; >> x2_max = 60; >> dx2 = x2_max - x2_min + 1 >> x2 = linspace(x2_min,x2_max,dx2); >> >> // create fake data for x2 axis >> fake_y = zeros(1,length(x2)); >> >> f = figure(); >> f.background = 8; >> >> drawlater() >> >> plot2d(x1, y1,1); >> plot2d(x1, y2,2); >> plot2d(x1, y3,5); >> a = gca() >> a.axes_visible(2)="off"; >> a.margins = [0.2 0.2 0.2 0.2]; >> >> // create y1 axis >> a1 = newaxes(); >> plot2d(fake_x, y1); // for fake_x = 0 creates a line on the y1-axis >> // therefore the fake data are not visible >> a1.children.children.visible = off; // hide fake graph if nesessary >> to only show the axes >> a1.data_bounds = [0,y1_min;1,y1_max]; // make x-coordinate start at >> 0 so that fake data aling with y-axis >> a1.axes_visible(1)="off"; >> a1.filled="off"; >> a1.y_location="left"; >> a1.margins = [0.2 0.2 0.2 0.2]; >> >> // create y2 axis >> a2 = newaxes(); >> c=color("blue"); >> a2.font_color=c; >> a2.foreground=c; >> plot2d(fake_x, y2,c); // for fake_x = 0 creates a line on the >> y2-axis >> // therefore the fake data are not visible >> a2.children.children.visible = off; // hide fake graph if nesessary >> to only show the axes >> a2.data_bounds = [0,y2_min;1,y2_max]; // set x-min to "0"...x_max >> does not matter, since x-axis wont be shown >> a2.axes_visible(1)="off"; >> a2.filled="off"; >> a2.y_location="left"; >> a2.margins = [0.1 0.2 0.2 0.2]; >> >> // create y3 axis >> a3 = newaxes(); >> c=color("red"); >> a3.font_color=c; >> a3.foreground=c; >> plot2d(fake_x, y3,c); // for fake_x = 0 creates a line on the >> y3-axis >> // therefore the fake data are not visible >> a3.children.children.visible = off; // hide fake graph if nesessary >> to only show the axes >> a3.data_bounds = [0,y3_min;1,y3_max]; // set x-min to "0"...x_max >> does not matter, since x-axis wont be shown >> a3.axes_visible(1)="off"; >> a3.filled="off"; >> a3.y_location="right"; >> a3.margins = [0.1 0.2 0.2 0.2]; >> a3.axes_reverse = ["on","off","off"]; // reverse x3 axis, since it >> is on the right side >> >> // create 2nd x-axis >> >> a4 = newaxes(); >> c=color("black"); >> a4.font_color=c; >> a4.foreground=c; >> plot2d(x2, fake_y,c); // for fake_y = 0 creates a line on the >> x2-axis >> // therefore the fake data are not visible >> a4.children.children.visible = off; // hide fake graph if nesessary >> to only show the axes >> a4.data_bounds = [min(x2),0;max(x2),1]; >> a4.axes_visible(2)="off"; >> a4.filled="off"; >> a4.x_location="bottom"; >> a4.margins = [0.2 0.2 0.2 0.1]; >> >> drawnow() >> >> 2016-10-09 1:04 GMT+02:00 Frieder Nikolaisen >> : >> >>> Dear Philipp, >>> >>> thank you, thats great. I will try it at work on monday. Actually, >>> I do have three plots sharing a common x axis and having three >>> different y axis. Why I do want to have two x axis is, to show to >>> different times on x. Once in secound, once in line of document. >>> >>> Best regards >>> >>> Frieder >>> >>> Am 08.10.2016 um 23:43 schrieb Philipp M?hlmann: >>> >>>> Dear Frieder, >>>> >>>> I understand following: >>>> >>>> You want to plot 3 graphs into one diagram. >>>> >>>> Basically each graph has its own x and y axis. >>>> >>>> Since for two graphs the x-axis are the same, you want to have a >>>> diagram with two x-axis and three y-axis ? >>>> >>>> Please find a code snipplet that will create such a diagram. >>>> >>>> Best regards, >>>> Philipp >>>> >>>> clc(); >>>> clear(all); >>>> >>>> x1 = linspace(1,10,10); >>>> x2 = linspace(0,100,101); >>>> x3 = x1; >>>> >>>> y1 = linspace(1,10,10); >>>> y2 = sin(x2); >>>> y3 = sqrt(x1); >>>> >>>> drawlater() >>>> >>>> plot2d(x1, y1); >>>> a1 = gca(); >>>> a1.x_location = "bottom"; >>>> a1.y_location = "left"; >>>> a1.margins = [0.2,0.2,0.2,0.2] >>>> >>>> // Axis y2 >>>> >>>> a2=newaxes(); >>>> c=color("blue"); >>>> plot2d(x2,y2,style = c); >>>> a2.font_color=c; >>>> a2.foreground=c; >>>> >>>> a2.filled="off"; >>>> a2.x_location="bottom"; >>>> a2.y_location="right"; >>>> a2.margins = [0.2,0.2,0.2,0.1]; // shift axis relative to >>>> graphic window >>>> a2.data_bounds = [0,-2.;100,2]; // change axis bounds, so that >>>> graph is nicely placed in plotted area >>>> >>>> // Axis y3 >>>> >>>> a3=newaxes(); >>>> c=color("red"); >>>> plot2d(x3,y3,style = c); >>>> a3.font_color=c; >>>> a3.foreground=c; >>>> a3.filled="off"; >>>> a3.x_location="bottom"; >>>> a3.y_location="left"; >>>> >>>> a3.data_bounds = [0,1;10,4]; >>>> a3.margins = [0.134 0.2 0.2 0.2]; >>>> >>>> // display x3 to check overlapping of x1 and x3 tics; >>>> // if overlapping is good enough, than hide x3 >>>> a3.axes_visible(1)="off"; >>>> >>>> drawnow() >>>> >>>> 2016-10-06 21:28 GMT+02:00 Jens Simon Strom >>> [3]>: >>>> >>>>> EDIT IN #3 >>>>> >>>>> Am 06.10.2016 18:20, schrieb Jens Simon Strom: >>>>> >>>>>> Hallo Frieder, >>>>>> You ask? many questions in one post. >>>>>> >>>>>> 1: You just divide the (numerical)? time interval into an >>>>>> adequate number of points (which can be neatly accommodated) >>>>>> with linspace or : and plot the corresponding time text >>>>>> colums via a for-loop. There is no need that text times >>>>>> coincide with measured data. They only should be placed at >>>>>> the correct locations. >>>>>> >>>>>> 3:You may not be familiar with how to get quick help from >>>>>> Scilab: Just highlight the command plot2d or style here and >>>>>> go to the help pages BY RIGHT MOUSE CLICK. >>>>>> >>>>>> 4: Highlight newaxes,? foreground >>>>>> >>>>>> 5: I would postpone integrating a checkbox until everything >>>>>> else is to your satisfaction. The rest of #5 is perhaps >>>>>> answered by #1. >>>>>> >>>>>> General remarks >>>>>> >>>>>> * ?Do not ask many questions simultaneously. Attack them >>>>>> one by one. You make it easier for yourself and the helpers. >>>>>> * Accompany your questions by short examples which omit? >>>>>> irrelevant ornaments. The code you really write with the >>>>>> variables you really use is less appropriate in most >>>>>> cases.? >>>>>> * Begin to polish the results (color, line types, fonts, >>>>>> fontsize, etc.) only as the last step in your work. At the >>>>>> beginning accept what Scilab delivers to you. >>>>>> * Work the help pages. >>>>>> >>>>>> My painful experience is that the polishing job often >>>>>> consumes more time (and nerves) than the technical problem >>>>>> itself. Scilab is far from intuitive in that respect. >>>>>> >>>>>> Kind regards, Jens >>>>>> >>>>>> ? >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org [1] >>>>> http://lists.scilab.org/mailman/listinfo/users [2] >>>> >>>> -- >>>> >>>> In Kanada is ka na da. Sonst w?r Kanada Jemanda. >>>> >>>> There?we have the salad. >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org [4] >>> http://lists.scilab.org/mailman/listinfo/users [5] >> >> -- >> >> 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. > > Links: > ------ > [1] mailto:users at lists.scilab.org > [2] http://lists.scilab.org/mailman/listinfo/users > [3] mailto:j.s.strom at hslmg.de > [4] mailto:users at lists.scilab.org > [5] http://lists.scilab.org/mailman/listinfo/users > [6] mailto:Frieder.Nikolaisen at student.hs-rm.de > [7] mailto:p.muehlmann at gmail.com From j.s.strom at hslmg.de Tue Oct 11 09:45:13 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Tue, 11 Oct 2016 09:45:13 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> Message-ID: <57FC9889.7090100@hslmg.de> Dear Frieder, Your diagram problem seems still to be pending. For further assistance it would be helpful if you answered a couple of questions: 1. Does your attachment "plot_date_16_lines.gif" (your mail 06.10.2016 15:06) show real time data? 2. Is the overlap of the time labeling text colums (YY.MM.DD.hh.mm.ss) the essential remaining problem? 3. What is the maximum time interval (in seconds) you want to accomodate on the x-axis? 4. How many time points you want to accomodate on the x-axis at most? Regards Jens --------------------------------------------------------------------------------------------------- Am 10.10.2016 13:38, schrieb Frieder Nikolaisen: > Dear Philipp, > > thanks for you help. I tried to adopt your Code to my programm. No > success. There is a prolbem I should have metioned eralier. The time > between each datapoint has a different time period. So I cant print > the y-axis over the time and add a a secound x axis for the line of > document. I might stick to the plotxyyy. > > Best regards > Frieder > > > > > > > > Am 10.10.2016 09:04, schrieb Philipp M?hlmann: >> Dear Frieder, >> >> one more comment. >> >> Instead of using "foo"-data, it might be more useful to plot each >> graph several times. >> >> Otherwise the y-axes are not assosiated with the data and you have to >> take more care about them. >> >> e.g.: >> >> // display all graph on first x-axis >> >> plot2d(x1,y1); // and hide the y1-axis >> >> plot2d(x1,y2); // and hide the y2-axis >> plot2d(x1,y3); // and hide the y3-axis >> >> // plot the y-axis assosiated with the corresponding data >> >> plot2d(x1,y1); // and hide the graph and the x1-axis and shift >> y1 to desired locaion >> plot2d(x1,y2); // and hide the graph and the x1-axis and shift >> y2 to desired locaion >> plot2d(x1,y3); // and hide the graph and the x1-axis and shift >> y3 to desired locaion >> >> // plot the x2-axis assosiated with the corresponding data >> >> plot2d(x2,y1); // and hide the graph and the y1-axis and shift >> x2 to desired locaion >> >> best regards, >> >> Philipp >> >> 2016-10-09 2:58 GMT+02:00 Philipp M?hlmann > [7]>: >> >>> OK. >>> >>> Please find attached a sample that might help you. >>> >>> Note: >>> It is possible to draw only an axis without showing the >>> corresponding data. >>> Hence: One can create some "fake" or "foo" data not displaying them, >>> but showing the corresponding axis. >>> >>> so using this principle, you can draw as many axes as you like..and >>> place them where you like. >>> >>> clc(); >>> clear(all); >>> >>> // all datashare same x axis >>> // example: there are 1000 datapoints >>> x1 = linspace(1,1000,1000); >>> >>> // each graph has its own y-axis >>> y1 = x1; >>> y2 = 200*sin(1/20 * x1); >>> y3 = sqrt(x1); >>> >>> // create fake x-values for y-axis >>> fake_x = zeros(1,length(x1)); >>> y1_min = 0; // min-value for y1-axis >>> y1_max = 100; // max value for y1 axis >>> >>> y2_min = -2; // min-value for y2-axis >>> y2_max = 2; // max value for y2 axis >>> >>> y3_min = 10; // min-value for y3-axis >>> y3_max = 20; // max value for y3 axis >>> >>> // create 2nd x-axis >>> // example: the 1000 datapoints has been taken in 60 seconds >>> x2_min = 0; >>> x2_max = 60; >>> dx2 = x2_max - x2_min + 1 >>> x2 = linspace(x2_min,x2_max,dx2); >>> >>> // create fake data for x2 axis >>> fake_y = zeros(1,length(x2)); >>> >>> f = figure(); >>> f.background = 8; >>> >>> drawlater() >>> >>> plot2d(x1, y1,1); >>> plot2d(x1, y2,2); >>> plot2d(x1, y3,5); >>> a = gca() >>> a.axes_visible(2)="off"; >>> a.margins = [0.2 0.2 0.2 0.2]; >>> >>> // create y1 axis >>> a1 = newaxes(); >>> plot2d(fake_x, y1); // for fake_x = 0 creates a line on the y1-axis >>> // therefore the fake data are not visible >>> a1.children.children.visible = off; // hide fake graph if nesessary >>> to only show the axes >>> a1.data_bounds = [0,y1_min;1,y1_max]; // make x-coordinate start at >>> 0 so that fake data aling with y-axis >>> a1.axes_visible(1)="off"; >>> a1.filled="off"; >>> a1.y_location="left"; >>> a1.margins = [0.2 0.2 0.2 0.2]; >>> >>> // create y2 axis >>> a2 = newaxes(); >>> c=color("blue"); >>> a2.font_color=c; >>> a2.foreground=c; >>> plot2d(fake_x, y2,c); // for fake_x = 0 creates a line on the >>> y2-axis >>> // therefore the fake data are not visible >>> a2.children.children.visible = off; // hide fake graph if nesessary >>> to only show the axes >>> a2.data_bounds = [0,y2_min;1,y2_max]; // set x-min to "0"...x_max >>> does not matter, since x-axis wont be shown >>> a2.axes_visible(1)="off"; >>> a2.filled="off"; >>> a2.y_location="left"; >>> a2.margins = [0.1 0.2 0.2 0.2]; >>> >>> // create y3 axis >>> a3 = newaxes(); >>> c=color("red"); >>> a3.font_color=c; >>> a3.foreground=c; >>> plot2d(fake_x, y3,c); // for fake_x = 0 creates a line on the >>> y3-axis >>> // therefore the fake data are not visible >>> a3.children.children.visible = off; // hide fake graph if nesessary >>> to only show the axes >>> a3.data_bounds = [0,y3_min;1,y3_max]; // set x-min to "0"...x_max >>> does not matter, since x-axis wont be shown >>> a3.axes_visible(1)="off"; >>> a3.filled="off"; >>> a3.y_location="right"; >>> a3.margins = [0.1 0.2 0.2 0.2]; >>> a3.axes_reverse = ["on","off","off"]; // reverse x3 axis, since it >>> is on the right side >>> >>> // create 2nd x-axis >>> >>> a4 = newaxes(); >>> c=color("black"); >>> a4.font_color=c; >>> a4.foreground=c; >>> plot2d(x2, fake_y,c); // for fake_y = 0 creates a line on the >>> x2-axis >>> // therefore the fake data are not visible >>> a4.children.children.visible = off; // hide fake graph if nesessary >>> to only show the axes >>> a4.data_bounds = [min(x2),0;max(x2),1]; >>> a4.axes_visible(2)="off"; >>> a4.filled="off"; >>> a4.x_location="bottom"; >>> a4.margins = [0.2 0.2 0.2 0.1]; >>> >>> drawnow() >>> >>> 2016-10-09 1:04 GMT+02:00 Frieder Nikolaisen >>> : >>> >>>> Dear Philipp, >>>> >>>> thank you, thats great. I will try it at work on monday. Actually, >>>> I do have three plots sharing a common x axis and having three >>>> different y axis. Why I do want to have two x axis is, to show to >>>> different times on x. Once in secound, once in line of document. >>>> >>>> Best regards >>>> >>>> Frieder >>>> >>>> Am 08.10.2016 um 23:43 schrieb Philipp M?hlmann: >>>> >>>>> Dear Frieder, >>>>> >>>>> I understand following: >>>>> >>>>> You want to plot 3 graphs into one diagram. >>>>> >>>>> Basically each graph has its own x and y axis. >>>>> >>>>> Since for two graphs the x-axis are the same, you want to have a >>>>> diagram with two x-axis and three y-axis >>>>> >>>>> Please find a code snipplet that will create such a diagram. >>>>> >>>>> Best regards, >>>>> Philipp >>>>> >>>>> clc(); >>>>> clear(all); >>>>> >>>>> x1 = linspace(1,10,10); >>>>> x2 = linspace(0,100,101); >>>>> x3 = x1; >>>>> >>>>> y1 = linspace(1,10,10); >>>>> y2 = sin(x2); >>>>> y3 = sqrt(x1); >>>>> >>>>> drawlater() >>>>> >>>>> plot2d(x1, y1); >>>>> a1 = gca(); >>>>> a1.x_location = "bottom"; >>>>> a1.y_location = "left"; >>>>> a1.margins = [0.2,0.2,0.2,0.2] >>>>> >>>>> // Axis y2 >>>>> >>>>> a2=newaxes(); >>>>> c=color("blue"); >>>>> plot2d(x2,y2,style = c); >>>>> a2.font_color=c; >>>>> a2.foreground=c; >>>>> >>>>> a2.filled="off"; >>>>> a2.x_location="bottom"; >>>>> a2.y_location="right"; >>>>> a2.margins = [0.2,0.2,0.2,0.1]; // shift axis relative to >>>>> graphic window >>>>> a2.data_bounds = [0,-2.;100,2]; // change axis bounds, so that >>>>> graph is nicely placed in plotted area >>>>> >>>>> // Axis y3 >>>>> >>>>> a3=newaxes(); >>>>> c=color("red"); >>>>> plot2d(x3,y3,style = c); >>>>> a3.font_color=c; >>>>> a3.foreground=c; >>>>> a3.filled="off"; >>>>> a3.x_location="bottom"; >>>>> a3.y_location="left"; >>>>> >>>>> a3.data_bounds = [0,1;10,4]; >>>>> a3.margins = [0.134 0.2 0.2 0.2]; >>>>> >>>>> // display x3 to check overlapping of x1 and x3 tics; >>>>> // if overlapping is good enough, than hide x3 >>>>> a3.axes_visible(1)="off"; >>>>> >>>>> drawnow() >>>>> >>>>> 2016-10-06 21:28 GMT+02:00 Jens Simon Strom >>>> [3]>: >>>>> >>>>>> EDIT IN #3 >>>>>> >>>>>> Am 06.10.2016 18:20, schrieb Jens Simon Strom: >>>>>> >>>>>>> Hallo Frieder, >>>>>>> You ask many questions in one post. >>>>>>> >>>>>>> 1: You just divide the (numerical) time interval into an >>>>>>> adequate number of points (which can be neatly accommodated) >>>>>>> with linspace or : and plot the corresponding time text >>>>>>> colums via a for-loop. There is no need that text times >>>>>>> coincide with measured data. They only should be placed at >>>>>>> the correct locations. >>>>>>> >>>>>>> 3:You may not be familiar with how to get quick help from >>>>>>> Scilab: Just highlight the command plot2d or style here and >>>>>>> go to the help pages BY RIGHT MOUSE CLICK. >>>>>>> >>>>>>> 4: Highlight newaxes, foreground >>>>>>> >>>>>>> 5: I would postpone integrating a checkbox until everything >>>>>>> else is to your satisfaction. The rest of #5 is perhaps >>>>>>> answered by #1. >>>>>>> >>>>>>> General remarks >>>>>>> >>>>>>> * Do not ask many questions simultaneously. Attack them >>>>>>> one by one. You make it easier for yourself and the helpers. >>>>>>> * Accompany your questions by short examples which omit >>>>>>> irrelevant ornaments. The code you really write with the >>>>>>> variables you really use is less appropriate in most >>>>>>> cases. >>>>>>> * Begin to polish the results (color, line types, fonts, >>>>>>> fontsize, etc.) only as the last step in your work. At the >>>>>>> beginning accept what Scilab delivers to you. >>>>>>> * Work the help pages. >>>>>>> >>>>>>> My painful experience is that the polishing job often >>>>>>> consumes more time (and nerves) than the technical problem >>>>>>> itself. Scilab is far from intuitive in that respect. >>>>>>> >>>>>>> Kind regards, Jens >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> users mailing list >>>>>> users at lists.scilab.org [1] >>>>>> http://lists.scilab.org/mailman/listinfo/users [2] >>>>> >>>>> -- >>>>> >>>>> In Kanada is ka na da. Sonst w?r Kanada Jemanda. >>>>> >>>>> There we have the salad. >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/mailman/listinfo/users >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org [4] >>>> http://lists.scilab.org/mailman/listinfo/users [5] >>> >>> -- >>> >>> 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. >> >> Links: >> ------ >> [1] mailto:users at lists.scilab.org >> [2] http://lists.scilab.org/mailman/listinfo/users >> [3] mailto:j.s.strom at hslmg.de >> [4] mailto:users at lists.scilab.org >> [5] http://lists.scilab.org/mailman/listinfo/users >> [6] mailto:Frieder.Nikolaisen at student.hs-rm.de >> [7] mailto:p.muehlmann at gmail.com > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From Frieder.Nikolaisen at student.hs-rm.de Tue Oct 11 11:04:23 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Tue, 11 Oct 2016 11:04:23 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57FC9889.7090100@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> Message-ID: <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> Dear Jens, yes, the plot_date_16_lines.gif Show real data, but only a few lines of it. For two reasons, showing the datevec isn't a good approach i asked for. Your tip to show the secounds instead of the datenumber, solved the Problem to have a readalbe time. I use a first diagramm for choosing the intervall I am going to process later on. For the choosing of the time period, I have two butooms that Show two different Diagramms. The first shows the entire time period and the scound enlargest the choosen period of time. I choose the period by tiping the start and finish line number in my gui. With the secounds printed, I do not know the line number. So I have to try and print and try and print. ... Why aren't the secounds the same as the line number (data Point)? Because my data Looks like this: Zeit Distanz Geschwindigkeit 1 Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen aktiv 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 0 0 1 0 0 0 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 0 0 1 0 0 0 03.04.2012 09:43:03.350 46476.4940 0.00 1059.06 0.24 0 1 0 1 0 0 0 03.04.2012 09:43:03.550 46476.4940 0.00 1059.06 0.24 0 1 1 1 1 0 0 03.04.2012 09:43:09.460 46476.4945 1.70 1059.06 0.24 0 1 1 1 1 0 0 Translate the header: time distance Speed Revolution Speed, .... The time period between each data Point isn't the same. Once the locomotive starts to operate, the programm does print line by line, each time a paramter changes. If the locomotive stands a few hours around, the data has a gap. But I want to print on one x axis the time in Secounds (or maybe hours or days, depends on the period I have to process). On the secound x-axis, I want to print the line number. On the attached Diagramm, you see that there is a gap between secound 2000 and secound 3500. That one must to be seen in the Diagramm, but I want to know what line is secound 2000 and what line is secound 3500, to maybe chosse the time of Operation of the locomotive before These night break. The question of datapoints is: They differ between a few tousand (50 000) and a few millions. The Programm must be able to operate with booth. The first Diagramm is going to Show me the entire time period of a few days. Then I have a secound Diagramm. With the secound one, I choose by tiping the start and finsih line number in my gui, the time period of my Diagramm. Maybe one day. Then I have the data a Little big bigger, then I do choose the hours of interet. That might be just one hour. Then I do type the lines of this time period. In the end, I do print the choosen time period in a new document, adding (calculating) a few more parametre like traction. With the printed document, is for Simulation. My approach now is. Plotting three Diagramm abooth each other. But I cannot ad a secound x-axis in a subplot by newaxis(). How to add a x-axis by using subplot? Thank you for your Support. Cheers Frieder (my webmailing Programm changes my lettering to capalization by Default, enyoing). How to copy the Code with the colours? 0001 drawlater() 0002 0003 subplot(3, 1, 1) 0004 co = color("green"); 0005 plot2d(x1, y1, co); 0006 a = gca(); 0007 a.font_color = co; 0008 a.foreground = co; 0009 a.axes_visible(1)= "off"; 0010 ylabel(string(kT(y_1)),"color",co) 0011 //a.y_location="right"; 0012 //a.marings = [0.1 0.1 0.1 0.7]; 0013 //a.filled = "off"; 0014 subplot(3, 1, 2) 0015 co = color("blue"); 0016 plot2d(x1, y2, co); 0017 b = gca(); 0018 b.font_color = co; 0019 b.foreground = co; 0020 ylabel(string(kT(y_2)),"color",co) 0021 b.axes_visible(1) = "off"; 0022 //b.marings = [0.1 0.1 0.3 0.5]; 0023 //b.filled = "off"; 0024 subplot(3, 1, 3) 0025 co=color("red"); 0026 plot2d(x1, y3, co); 0027 c = gca(); 0028 //c.font_color = co; 0029 //c.foreground = co; 0030 //c.axes_visible(1) = "off"; 0031 ylabel(string(kT(y_3)),"color",co) 0032 xlabel(string('Zeit [Sekunden]')) 0033 //c.marings = [0.1 0.1 0.5 0.3]; 0034 //c.filled = "off"; 0035 0036 // Erstellt zweite x-Achse Problem: Kein newaxis im subplot m?glich 0037 //subplot(3,1,3); 0038 //c=newaxes(c) 0039 //co = color("blue"); 0040 //plot2d(x1, y2, co); 0041 //c.font_color = co; 0042 //c.foreground = co; 0043 //c.axes_visible(2) = "off"; 0044 0045 drawnow() Am 11.10.2016 09:45, schrieb Jens Simon Strom: > Dear Frieder, > Your diagram problem seems still to be pending. For further assistance > it would be helpful if you answered a couple of questions: > 1. Does your attachment "plot_date_16_lines.gif" (your mail 06.10.2016 > 15:06) show real time data? > 2. Is the overlap of the time labeling text colums (YY.MM.DD.hh.mm.ss) > the essential remaining problem? > 3. What is the maximum time interval (in seconds) you want to accomodate > on the x-axis? > 4. How many time points you want to accomodate on the x-axis at most? > > Regards > Jens > --------------------------------------------------------------------------------------------------- > > Am 10.10.2016 13:38, schrieb Frieder Nikolaisen: > >> Dear Philipp, thanks for you help. I tried to adopt your Code to my programm. No success. There is a prolbem I should have metioned eralier. The time between each datapoint has a different time period. So I cant print the y-axis over the time and add a a secound x axis for the line of document. I might stick to the plotxyyy. Best regards Frieder Am 10.10.2016 09:04, schrieb Philipp M?hlmann: >> >>> Dear Frieder, one more comment. Instead of using "foo"-data, it might be more useful to plot each graph several times. Otherwise the y-axes are not assosiated with the data and you have to take more care about them. e.g.: // display all graph on first x-axis plot2d(x1,y1); // and hide the y1-axis plot2d(x1,y2); // and hide the y2-axis plot2d(x1,y3); // and hide the y3-axis // plot the y-axis assosiated with the corresponding data plot2d(x1,y1); // and hide the graph and the x1-axis and shift y1 to desired locaion plot2d(x1,y2); // and hide the graph and the x1-axis and shift y2 to desired locaion plot2d(x1,y3); // and hide the graph and the x1-axis and shift y3 to desired locaion // plot the x2-axis assosiated with the corresponding data plot2d(x2,y1); // and hide the graph and the y1-axis and shift x2 to desired locaion best regards, Philipp 2016-10-09 2:58 GMT+02:00 Philipp M?hlmann : >>> >>>> OK. Please find attached a sample that might help you. Note: It is possible to draw only an axis without showing the corresponding data. Hence: One can create some "fake" or "foo" data not displaying them, but showing the corresponding axis. so using this principle, you can draw as many axes as you like..and place them where you like. clc(); clear(all); // all datashare same x axis // example: there are 1000 datapoints x1 = linspace(1,1000,1000); // each graph has its own y-axis y1 = x1; y2 = 200*sin(1/20 * x1); y3 = sqrt(x1); // create fake x-values for y-axis fake_x = zeros(1,length(x1)); y1_min = 0; // min-value for y1-axis y1_max = 100; // max value for y1 axis y2_min = -2; // min-value for y2-axis y2_max = 2; // max value for y2 axis y3_min = 10; // min-value for y3-axis y3_max = 20; // max value for y3 axis // create 2nd x-axis // example: the 1000 datapoints has been taken in 60 seconds x2_min = 0; x2_max = 60; dx2 = x2_max - x2_min + 1 x2 = linspace(x2_min,x2_max,dx2); // create fake data for x2 axis fake_y = zeros(1,length(x2)); f = figure(); f.background = 8; drawlater() plot2d(x1, y1,1); plot2d(x1, y2,2); plot2d(x1, y3,5); a = gca() a.axes_visible(2)="off"; a.margins = [0.2 0.2 0.2 0.2]; // create y1 axis a1 = newaxes(); plot2d(fake_x, y1); // for fake_x = 0 creates a line on the y1-axis // therefore the fake data are not visible a1.children.children.visible = off; // hide fake graph if nesessary to only show the axes a1.data_bounds = [0,y1_min;1,y1_max]; // make x-coordinate start at 0 so that fake data aling with y-axis a1.axes_visible(1)="off"; a1.filled="off"; a1.y_location="left"; a1.margins = [0.2 0.2 0.2 0.2]; // create y2 axis a2 = newaxes(); c=color("blue"); a2.font_color=c; a2.foreground=c; plot2d(fake_x, y2,c); // for fake_x = 0 creates a line on the y2-axis // therefore the fake data are not visible a2.children.children.visible = off; // hide fake graph if nesessary to only show the axes a2.data_bounds = [0,y2_min;1,y2_max]; // set x-min to "0"...x_max does not matter, since x-axis wont be shown a2.axes_visible(1)="off"; a2.filled="off"; a2.y_location="left"; a2.margins = [0.1 0.2 0.2 0.2]; // create y3 axis a3 = newaxes(); c=color("red"); a3.font_color=c; a3.foreground=c; plot2d(fake_x, y3,c); // for fake_x = 0 creates a line on the y3-axis // therefore the fake data are not visible a3.children.children.visible = off; // hide fake graph if nesessary to only show the axes a3.data_bounds = [0,y3_min;1,y3_max]; // set x-min to "0"...x_max does not matter, since x-axis wont be shown a3.axes_visible(1)="off"; a3.filled="off"; a3.y_location="right"; a3.margins = [0.1 0.2 0.2 0.2]; a3.axes_reverse = ["on","off","off"]; // reverse x3 axis, since it is on the right side // create 2nd x-axis a4 = newaxes(); c=color("black"); a4.font_color=c; a4.foreground=c; plot2d(x2, fake_y,c); // for fake_y = 0 creates a line on the x2-axis // therefore the fake data are not visible a4.children.children.visible = off; // hide fake graph if nesessary to only show the axes a4.data_bounds = [min(x2),0;max(x2),1]; a4.axes_visible(2)="off"; a4.filled="off"; a4.x_location="bottom"; a4.margins = [0.2 0.2 0.2 0.1]; drawnow() 2016-10-09 1:04 GMT+02:00 Frieder Nikolaisen : >>>> >>>>> Dear Philipp, thank you, thats great. I will try it at work on monday. Actually, I do have three plots sharing a common x axis and having three different y axis. Why I do want to have two x axis is, to show to different times on x. Once in secound, once in line of document. Best regards Frieder Am 08.10.2016 um 23:43 schrieb Philipp M?hlmann: >>>>> >>>>>> Dear Frieder, I understand following: You want to plot 3 graphs into one diagram. Basically each graph has its own x and y axis. Since for two graphs the x-axis are the same, you want to have a diagram with two x-axis and three y-axis Please find a code snipplet that will create such a diagram. Best regards, Philipp clc(); clear(all); x1 = linspace(1,10,10); x2 = linspace(0,100,101); x3 = x1; y1 = linspace(1,10,10); y2 = sin(x2); y3 = sqrt(x1); drawlater() plot2d(x1, y1); a1 = gca(); a1.x_location = "bottom"; a1.y_location = "left"; a1.margins = [0.2,0.2,0.2,0.2] // Axis y2 a2=newaxes(); c=color("blue"); plot2d(x2,y2,style = c); a2.font_color=c; a2.foreground=c; a2.filled="off"; a2.x_location="bottom"; a2.y_location="right"; a2.margins = [0.2,0.2,0.2,0.1]; // shift axis relative to graphic window a2.data_bounds = [0,-2.;100,2]; // change axis bounds, so that graph is nicely placed in plotted area // Axis y3 a3=newaxes(); c=color("red"); plot2d(x3,y3,style = c); a3.font_color=c; a3.foreground=c; a3.filled="off"; a3.x_location="bottom"; a3.y_location="left"; a3.data_bounds = [0,1;10,4]; a3.margins = [0.134 0.2 0.2 0.2]; // display x3 to check overlapping of x1 and x3 tics; // if overlapping is good enough, than hide x3 a3.axes_visible(1)="off"; drawnow() 2016-10-06 21:28 GMT+02:00 Jens Simon Strom : >>>>>> >>>>>>> EDIT IN #3 Am 06.10.2016 18:20, schrieb Jens Simon Strom: >>>>>>> >>>>>>>> Hallo Frieder, You ask many questions in one post. 1: You just divide the (numerical) time interval into an adequate number of points (which can be neatly accommodated) with linspace or : and plot the corresponding time text colums via a for-loop. There is no need that text times coincide with measured data. They only should be placed at the correct locations. 3:You may not be familiar with how to get quick help from Scilab: Just highlight the command plot2d or style here and go to the help pages BY RIGHT MOUSE CLICK. 4: Highlight newaxes, foreground 5: I would postpone integrating a checkbox until everything else is to your satisfaction. The rest of #5 is perhaps answered by #1. General remarks * Do not ask many questions simultaneously. Attack them one by one. You make it easier for yourself and the helpers. * Accompany your questions by short examples which omit irrelevant ornaments. The code you really write with the variables you really use is less appropriate in most cases. * Begin to polish the results (color, line types, fonts, fontsize, etc.) only as the last step in your work. At the beginning accept what Scilab delivers to you. * Work the help pages. My painful experience is that the polishing job often consumes more time (and nerves) than the technical problem itself. Scilab is far from intuitive in that respect. Kind regards, Jens >>>>>>> _______________________________________________ users mailing list users at lists.scilab.org [1] [1] http://lists.scilab.org/mailman/listinfo/users [2] [2] >>>>>> -- In Kanada is ka na da. Sonst w?r Kanada Jemanda. There we have the salad. _______________________________________________ users mailing list users at lists.scilab.org [4] http://lists.scilab.org/mailman/listinfo/users [5] >>>>> _______________________________________________ users mailing list users at lists.scilab.org [6] [4] http://lists.scilab.org/mailman/listinfo/users [7] [5] >>>> -- 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. Links: ------ [1] mailto:users at lists.scilab.org [10] [2] http://lists.scilab.org/mailman/listinfo/users [11] [3] mailto:j.s.strom at hslmg.de [12] [4] mailto:users at lists.scilab.org [13] [5] http://lists.scilab.org/mailman/listinfo/users [14] [6] mailto:Frieder.Nikolaisen at student.hs-rm.de [15] [7] mailto:p.muehlmann at gmail.com [16] >> _______________________________________________ users mailing list users at lists.scilab.org [17] http://lists.scilab.org/mailman/listinfo/users [18] > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users capitalization [19]AE [20] Links: ------ [1] mailto:users at lists.scilab.org [2] http://lists.scilab.org/mailman/listinfo/users [3] mailto:j.s.strom at hslmg.de [4] mailto:users at lists.scilab.org [5] http://lists.scilab.org/mailman/listinfo/users [6] mailto:users at lists.scilab.org [7] http://lists.scilab.org/mailman/listinfo/users [8] mailto:Frieder.Nikolaisen at student.hs-rm.de [9] mailto:p.muehlmann at gmail.com [10] mailto:users at lists.scilab.org [11] http://lists.scilab.org/mailman/listinfo/users [12] mailto:j.s.strom at hslmg.de [13] mailto:users at lists.scilab.org [14] http://lists.scilab.org/mailman/listinfo/users [15] mailto:Frieder.Nikolaisen at student.hs-rm.de [16] mailto:p.muehlmann at gmail.com [17] mailto:users at lists.scilab.org [18] http://lists.scilab.org/mailman/listinfo/users [19] http://dict.leo.org/ende/index_de.html#/search=capitalization&searchLoc=0&resultOrder=basic&multiwordShowSingle=on&pos=0 [20] http://dict.leo.org/ende/index_de.html#/search=AE&searchLoc=0&resultOrder=basic&multiwordShowSingle=on&pos=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 11.10.16.gif Type: image/gif Size: 10440 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Tue Oct 11 14:46:51 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 11 Oct 2016 12:46:51 +0000 Subject: [Scilab-users] Fwd: plotxxyyy References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> Message-ID: Hi, I was not able to follow the whole discussion but concerning your subplot challenge: ?? I cannot add a second x-axis in a subplot by newaxis(). How to add a x-axis by using subplot?? and your last example, Couldn?t you add a 4th subplot at the bottom in order to plot the 2nd x-axis (say by plotting only zeros)? Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Frieder Nikolaisen Sent: Tuesday, October 11, 2016 11:04 AM To: Users mailing list for Scilab > Subject: Re: [Scilab-users] Fwd: plotxxyyy Dear Jens, yes, the plot_date_16_lines.gif Show real data, but only a few lines of it. For two reasons, showing the datevec isn't a good approach i asked for. Your tip to show the secounds instead of the datenumber, solved the Problem to have a readalbe time. I use a first diagramm for choosing the intervall I am going to process later on. For the choosing of the time period, I have two butooms that Show two different Diagramms. The first shows the entire time period and the scound enlargest the choosen period of time. I choose the period by tiping the start and finish line number in my gui. With the secounds printed, I do not know the line number. So I have to try and print and try and print. ... Why aren't the secounds the same as the line number (data Point)? Because my data Looks like this: Zeit Distanz Geschwindigkeit 1 Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen aktiv 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 0 0 1 0 0 0 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 0 0 1 0 0 0 03.04.2012 09:43:03.350 46476.4940 0.00 1059.06 0.24 0 1 0 1 0 0 0 03.04.2012 09:43:03.550 46476.4940 0.00 1059.06 0.24 0 1 1 1 1 0 0 03.04.2012 09:43:09.460 46476.4945 1.70 1059.06 0.24 0 1 1 1 1 0 0 Translate the header: time distance Speed Revolution Speed, .... The time period between each data Point isn't the same. Once the locomotive starts to operate, the programm does print line by line, each time a paramter changes. If the locomotive stands a few hours around, the data has a gap. But I want to print on one x axis the time in Secounds (or maybe hours or days, depends on the period I have to process). On the secound x-axis, I want to print the line number. On the attached Diagramm, you see that there is a gap between secound 2000 and secound 3500. That one must to be seen in the Diagramm, but I want to know what line is secound 2000 and what line is secound 3500, to maybe chosse the time of Operation of the locomotive before These night break. The question of datapoints is: They differ between a few tousand (50 000) and a few millions. The Programm must be able to operate with booth. The first Diagramm is going to Show me the entire time period of a few days. Then I have a secound Diagramm. With the secound one, I choose by tiping the start and finsih line number in my gui, the time period of my Diagramm. Maybe one day. Then I have the data a Little big bigger, then I do choose the hours of interet. That might be just one hour. Then I do type the lines of this time period. In the end, I do print the choosen time period in a new document, adding (calculating) a few more parametre like traction. With the printed document, is for Simulation. My approach now is. Plotting three Diagramm abooth each other. But I cannot ad a secound x-axis in a subplot by newaxis(). How to add a x-axis by using subplot? Thank you for your Support. Cheers Frieder (my webmailing Programm changes my lettering to capalization by Default, enyoing). -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frieder.Nikolaisen at student.hs-rm.de Tue Oct 11 15:24:09 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Tue, 11 Oct 2016 15:24:09 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> Message-ID: <082c7a71bd57b4aee9ea78de1dd4d1b6@mail.student.hs-rm.de> Hi Rafael, I tried it. But then I have a fourth plot, taking 1/4 of the window. I tried to use marings and looked subplot up in the help - but there is nothing about how to turn of the y-axis space (not just hide the y-axis) and to cut the space of the fourth plot the Minimum, that it sits direclty beneath the 3th. Thanks for the idea, Rafael. Regards Frieder On 2016-10-11 14:46, Rafael Guerra wrote: > Hi, > > I was not able to follow the whole discussion but concerning your subplot challenge: "_? I cannot add a second x-axis in a subplot by newaxis(). How to add a x-axis by using subplot?_" and your last example, > > Couldn't you add a 4th subplot at the bottom in order to plot the 2ndx-axis (say by plotting only zeros)? > > Regards, > > Rafael > > FROM: users [mailto:users-bounces at lists.scilab.org [1]] ON BEHALF OF Frieder Nikolaisen > SENT: Tuesday, October 11, 2016 11:04 AM > TO: Users mailing list for Scilab > SUBJECT: Re: [Scilab-users] Fwd: plotxxyyy > > Dear Jens, > > yes, the plot_date_16_lines.gif Show real data, but only a few lines of it. > > For two reasons, showing the datevec isn't a good approach i asked for. Your tip to show the secounds instead of the datenumber, solved the Problem to have a readalbe time. I use a first diagramm for choosing the intervall I am going to process later on. For the choosing of the time period, I have two butooms that Show two different Diagramms. The first shows the entire time period and the scound enlargest the choosen period of time. > > I choose the period by tiping the start and finish line number in my gui. With the secounds printed, I do not know the line number. So I have to try and print and try and print. ... > > Why aren't the secounds the same as the line number (data Point)? > > Because my data Looks like this: > > Zeit Distanz Geschwindigkeit 1 Drehzahl Cv-Druck Richtung Lokbremse anlegen Lokbremse l?sen Zugbremse anlegen Zugbremse l?sen Kupplung bet?tigt Bremsen aktiv > > 03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 0 0 1 0 0 0 > 03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 0 0 1 0 0 0 > 03.04.2012 09:43:03.350 46476.4940 0.00 1059.06 0.24 0 1 0 1 0 0 0 > 03.04.2012 09:43:03.550 46476.4940 0.00 1059.06 0.24 0 1 1 1 1 0 0 > 03.04.2012 09:43:09.460 46476.4945 1.70 1059.06 0.24 0 1 1 1 1 0 0 > > Translate the header: time distance Speed Revolution Speed, .... > > The time period between each data Point isn't the same. Once the locomotive starts to operate, the programm does print line by line, each time a paramter changes. If the locomotive stands a few hours around, the data has a gap. > > But I want to print on one x axis the time in Secounds (or maybe hours or days, depends on the period I have to process). On the secound x-axis, I want to print the line number. On the attached Diagramm, you see that there is a gap between secound 2000 and secound 3500. That one must to be seen in the Diagramm, but I want to know what line is secound 2000 and what line is secound 3500, to maybe chosse the time of Operation of the locomotive before These night break. > > The question of datapoints is: They differ between a few tousand (50 000) and a few millions. The Programm must be able to operate with booth. The first Diagramm is going to Show me the entire time period of a few days. Then I have a secound Diagramm. With the secound one, I choose by tiping the start and finsih line number in my gui, the time period of my Diagramm. Maybe one day. Then I have the data a Little big bigger, then I do choose the hours of interet. That might be just one hour. Then I do type the lines of this time period. > > In the end, I do print the choosen time period in a new document, adding (calculating) a few more parametre like traction. With the printed document, is for Simulation. > > My approach now is. Plotting three Diagramm abooth each other. But I cannot ad a secound x-axis in a subplot by newaxis(). How to add a x-axis by using subplot? > > Thank you for your Support. > > Cheers > > Frieder > > (my webmailing Programm changes my lettering to capalization by Default, enyoing). Links: ------ [1] mailto:users-bounces at lists.scilab.org [2] mailto:users at lists.scilab.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Tue Oct 11 16:23:08 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 11 Oct 2016 14:23:08 +0000 Subject: [Scilab-users] Fwd: plotxxyyy References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> <082c7a71bd57b4aee9ea78de1dd4d1b6@mail.student.hs-rm.de> Message-ID: Hi Frieder, Please, check this for the 2nd x-axis matter: x1 = -10:0.5:10; y1 = sin(x1); x2 = -20:20; y2= 5*cos(x2); x3 = -30:2:30; clf() subplot(4,1,1) plot(x1,y1,'r') subplot(4,1,2) plot(x2,y2,'b') subplot(4,1,3) plot(x1,y1,'g',x2,y2,'c') subplot(4,1,4) plot2d(x3,0*x3,strf="020"); //no box surrounding plot a=gca(); a.children.children(1).visible = "off"; // line invisible a.axes_visible = ['on','off']; a.x_location = 'top'; PS: Would it be possible to increase the message size limit of 100 KB on this ML? 100 KB seems too restrictive. Regards, Rafael From jrafaelbguerra at hotmail.com Tue Oct 11 17:39:24 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 11 Oct 2016 15:39:24 +0000 Subject: [Scilab-users] RE(2): plotxxyyy Message-ID: Hi Frieder, The revised code here below should meet better your requirements for plotting a 2nd x-axis, as no 4th subplot is needed. You may play further with the margins to fit your data. x1 = (-10:0.5:10)'; y1 = sin(x1); x2 = (-20:20)'; y2= 5*cos(x2); x3 = (-30:2:30)'; clf() subplot(3,1,1) plot2d(x1,y1,color('red'),strf="020"); //no box surrounding plot a=gca(); a.x_location = 'top'; a.axes_visible = ['off','on']; a.margins = [0.1 0.1 0.2 0.1]; subplot(3,1,2) plot2d(x2,y2,color('blue'),strf="020"); ////no box surrounding plot a=gca(); a.axes_visible = ['off','on']; subplot(3,1,3) plot2d([x1,x2],[y1,y2],style=[color('cyan'),color('green')],strf="020") a=gca(); a.axes_visible = ['on','on']; a = newaxes(); a.axes_bounds =[0,-0.07,1,1]; a.filled = 'off'; plot2d(x3,0*x3,strf="020"); //no box surrounding plot a=gca(); a.children.children(1).visible = "off"; // line invisible a.axes_visible = ['on','off']; a.x_location = 'top'; PS: Would it be possible to increase the message size limit of 100 KB on this ML? 100 KB seems too restrictive. Regards, Rafael From j.s.strom at hslmg.de Tue Oct 11 19:20:14 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Tue, 11 Oct 2016 19:20:14 +0200 Subject: [Scilab-users] RE(2): plotxxyyy In-Reply-To: References: Message-ID: <57FD1F4E.1010402@hslmg.de> Hi Frieder, Here comes a different approach! By the nature of your non equidistant measuremet times there may be point clusters - difficult to separate. The idea is to plot the measurement number stacked on a sawtooth curve, thus separating them and render them readable. This is a substitute of a second x-axis. Try the following snippet with your original ugly:-) data. format(12) //Your data DataText=[ '03.04.2012 08:49:20.090 46476.4940 0.00 478.61 0.53 0 0 0 1 0 0 0' '03.04.2012 09:42:42.120 46476.4940 0.00 1150.71 0.24 0 0 0 1 0 0 0' '03.04.2012 09:43:03.350 46476.4940 0.00 1059.06 0.24 0 1 0 1 0 0 0' '03.04.2012 09:43:03.550 46476.4940 0.00 1059.06 0.24 0 1 1 1 1 0 0' '03.04.2012 09:43:09.460 46476.4945 1.70 1059.06 0.24 0 1 1 1 1 0 0']; nM=size(DataText,'r')//number of measurements distoff=46000;//Offset for distance (not to exeed the plot resolution) D= evstr(part(DataText,[1:2])); M= evstr(part(DataText,[4:5])); Y= evstr(part(DataText,[7:10])); h= evstr(part(DataText,[12:13])); m= evstr(part(DataText,[15:16])); s= evstr(part(DataText,[18:22])); dist=evstr(part(DataText,[25:34])) - distoff; TimeInDays = datenum(Y, M, D, h, m, s); TimeInHours =(TimeInDays-TimeInDays(1))*24; xdel(); plot(TimeInHours,dist,'+-r') ca=gca(); ca.data_bounds=ca.data_bounds+[-0.02 -0.0001 //get margins 0.02 0.0001]; ca.tight_limits="on"; //The idea <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< nstack=6;//height of number stack yspan=max(dist)-min(dist); for i=1:nM//measurement number xstring(TimeInHours(i),dist(1)+(modulo(i,nstack)-1)*0.05*yspan,string(i)) end The abscissa of the point numbers are related to the measurement times; the ordinates only target readability. Regards, Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Oct 11 21:04:35 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 11 Oct 2016 21:04:35 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> Message-ID: <57FD37C3.4030801@free.fr> Hello, Le 11/10/2016 14:46, Rafael Guerra a ?crit : > > Hi, > > I was not able to follow the whole discussion > Neither did i, > > but concerning your subplot challenge: ?/? I cannot add a second > x-axis in a subplot by newaxis(). How to add a x-axis by using > subplot?/?and your last example, > > Couldn?t you add a 4^th subplot at the bottom in order to plot the > 2^nd x-axis (say by plotting only zeros)? > . Why not using drawaxis() as already suggested? drawaxis() is made for this kind of situation. In this thread, no logarithmic axis is involved. So i do to catch the reason of ignoring drawaxis(). By the way, IMO, a drawing of what exactly is required would be clearer than hundred of lines of description, with schematic curves, axes, arrows linking curves to their multiple axes in x and y. BR Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frieder.Nikolaisen at student.hs-rm.de Wed Oct 12 10:52:53 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Wed, 12 Oct 2016 10:52:53 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57FD37C3.4030801@free.fr> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> <57FD37C3.4030801@free.fr> Message-ID: <606fa9c9d24e7fc4ec0e39195918ab4d@mail.student.hs-rm.de> Hello, thank you for all the feedback and help. It's really great. I used the idea of Jens Simon Strom combined with some help from last week: //Datens?tze x1 = (A(:,1) - A(1,1)) * 24 * 3600; y1 = A(:,y_1); y2 = A(:,y_2); y3 = A(:,y_3); drawlater() subplot(3, 1, 1) co = color("green"); plot2d(x1, y1, co); a = gca(); b.font_color = co; a.foreground = co; ylabel(string(kT(y_1)),"color",co) a.x_location = 'top'; subplot(3, 1, 2) co = color("blue"); plot2d(x1, y2, co); b = gca(); b.font_color = co; b.foreground = co; ylabel(string(kT(y_2)),"color",co) b.axes_visible(1) = "off"; //b.marings = [0.1 0.1 0.3 0.5]; //b.filled = "off"; subplot(3, 1, 3) co=color("red"); plot2d(x1, y3, co); c = gca(); c.font_color = co; c.foreground = co; //c.axes_visible(1) = "off"; ylabel(string(kT(y_3)),"color",co) //xlabel(string('Zeit [Sekunden]'), co) x= (A(:,1) - A(1,1)) * 24 * 3600; for k=1:A_size(1,1) //Beschriftung xstring(x(k),x(1),string(k)) // x(1) always 0 // xstring(x,y,str,[angle,[box]]) disp(x(1)) end //c.marings = [0.1 0.1 0.5 0.3]; //c.filled = "off"; drawnow() The printed plots are attached. I did plot different paramters, as I can choose then in my GUI. That works well: * Three plots, having the same x axis. * x axis on the top and bottom * Line NUMBERS FITTING THE X AXIS. That does not work: * showing a FEW LINE NUMBERS only, for reading (best case: Fitting the automatic shown times in sec Problem: I cannot tell, how many datapoints there are going to be. So it mus be choosen automaticly. Best regards Frieder On 2016-10-11 21:04, Samuel Gougeon wrote: > Hello, > > Le 11/10/2016 14:46, Rafael Guerra a ?crit : > >> Hi, >> >> I was not able to follow the whole discussion > Neither did i, > >> but concerning your subplot challenge: "_? I cannot add a second x-axis in a subplot by newaxis(). How to add a x-axis by using subplot?_" and your last example, >> >> Couldn't you add a 4th subplot at the bottom in order to plot the 2ndx-axis (say by plotting only zeros)? > . > Why not using drawaxis() as already suggested? drawaxis() is made for this kind of situation. > In this thread, no logarithmic axis is involved. So i do to catch the reason of ignoring drawaxis(). > > By the way, IMO, a drawing of what exactly is required would be clearer than hundred of lines of description, with schematic curves, axes, arrows linking curves to their multiple axes in x and y. > > BR > Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: subplot_with_line_number_1.gif Type: image/gif Size: 7918 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: subplot_with_line_number_2.gif Type: image/gif Size: 9522 bytes Desc: not available URL: From j.s.strom at hslmg.de Wed Oct 12 11:48:43 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Wed, 12 Oct 2016 11:48:43 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <606fa9c9d24e7fc4ec0e39195918ab4d@mail.student.hs-rm.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> <57FD37C3.4030801@free.fr> <606fa9c9d24e7fc4ec0e39195918ab4d@mail.student.hs-rm.de> Message-ID: <57FE06FB.5070606@hslmg.de> Hello Frieder, Your plots look better now. You can avoid overlapping of measurement numbers by sawtooth stacking them. See example code below. xdel(); //Generating dummy measurements x,y dx=0.5:50; x=cumsum(dx); y=sind(x); nM=length(x);//number of measurements plot(x,y,'r') plot(x,y,'b+') //Plotting the measurement numbers in stacks to avoid overlapping nstack=6;//number of stacked measurement numbers hstack=0.2;//height of measurement number stack (relative to window height) ybase=-0.9; //base ordinate for measurement numbers yspan=max(y)-min(y); for m=1:nM//measurement number xstring(x(m),ybase+(modulo(m,nstack)-1)*hstack*yspan/nstack,string(m)) end Kind regards Jens ------------------------------------------------------------------------------------------------------------------------------ Am 12.10.2016 10:52, schrieb Frieder Nikolaisen: > > Hello, > > thank you for all the feedback and help. It's really great. > > I used the idea of Jens Simon Strom combined with some help from last > week: > > //Datens?tze > x1 = (A(:,1) - A(1,1)) * 24 * 3600; > y1 = A(:,y_1); > y2 = A(:,y_2); > y3 = A(:,y_3); > drawlater() > > subplot(3, 1, 1) > co = color("green"); > plot2d(x1, y1, co); > a = gca(); > b.font_color = co; > a.foreground = co; > ylabel(string(kT(y_1)),"color",co) > a.x_location = 'top'; > > subplot(3, 1, 2) > co = color("blue"); > plot2d(x1, y2, co); > b = gca(); > b.font_color = co; > b.foreground = co; > ylabel(string(kT(y_2)),"color",co) > b.axes_visible(1) = "off"; > //b.marings = [0.1 0.1 0.3 0.5]; > //b.filled ="off"; > subplot(3, 1, 3) > co=color("red"); > plot2d(x1, y3, co); > c = gca(); > c.font_color = co; > c.foreground = co; > //c.axes_visible(1) ="off"; > ylabel(string(kT(y_3)),"color",co) > //xlabel(string('Zeit [Sekunden]'), co) > x= (A(:,1) - A(1,1)) * 24 * 3600; > for k=1:A_size(1,1) //Beschriftung > xstring(x(k),x(1),string(k)) // x(1) always 0 > // xstring(x,y,str,[angle,[box]]) > disp(x(1)) > end > //c.marings = [0.1 0.1 0.5 0.3]; > //c.filled ="off"; > > drawnow() > > > The printed plots are attached. I did plot different paramters, as I can choose then in my GUI. > That works well: > > * Three plots, having the same x axis. > * x axis on the top and bottom > * Line *numbers Fitting the x axis*. > > That does not work: > > * showing a *few line numbers* only, for reading (best case: Fitting > the automatic shown times in sec > > Problem: I cannot tell, how many datapoints there are going to be. So > it mus be choosen automaticly. > > Best regards > > Frieder > > On 2016-10-11 21:04, Samuel Gougeon wrote: > >> Hello, >> >> Le 11/10/2016 14:46, Rafael Guerra a ?crit : >>> >>> Hi, >>> >>> I was not able to follow the whole discussion >>> >> Neither did i, >>> >>> but concerning your subplot challenge: "/... I cannot add a second >>> x-axis in a subplot by newaxis(). How to add a x-axis by using >>> subplot?/"and your last example, >>> >>> Couldn't you add a 4^th subplot at the bottom in order to plot the >>> 2^nd x-axis (say by plotting only zeros)? >>> >> . >> Why not using drawaxis() as already suggested? drawaxis() is made for >> this kind of situation. >> In this thread, no logarithmic axis is involved. So i do to catch the >> reason of ignoring drawaxis(). >> >> By the way, IMO, a drawing of what exactly is required would be >> clearer than hundred of lines of description, with schematic curves, >> axes, arrows linking curves to their multiple axes in x and y. >> >> BR >> Samuel Gougeon >> > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From Frieder.Nikolaisen at student.hs-rm.de Wed Oct 12 14:01:02 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Wed, 12 Oct 2016 14:01:02 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57FE06FB.5070606@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE34D2.10006@hslmg.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> <57FD37C3.4030801@free.fr> <606fa9c9d24e7fc4ec0e39195918ab4d@mail.student.hs-rm.de> <57FE06FB.5070606@hslmg.de> Message-ID: <8561ba4baf28602c5ff7a56f3fbbf0f8@mail.student.hs-rm.de> Hello everybody, I did solve the Problem with showing only 10 line numbers, by using IF. printer=1 for k=1:A_size(1,1) //Beschriftung IF K>A_SIZE(1,1)*(PRINTER/10) THEN printer = printer + 1 xstring(x(k),y3(1),string(k)) // xstring(x,y,str,[angle,[box]]) end set(handles.Anzeige, 'string', 'Diagrammbeschriftung ' + string(k) + ' von ' + string(A_size(1,1))) end The line numbering is connected to the y-axis. How can I move the lattering aboth the plot (or at least the bottom, next to the x-axis)? (attached plot: subplot_with_line_number_2_tenth.gif) About Jens help: I attached three plots: the stacks Picture are with the Code of Jens. Stacking is really nice, but I do not need every line number. With 921 data Points, it is already unreadable again. But thanks for your ideas, the Code is great for learningn anyway. Cheers Frieder On 2016-10-12 11:48, Jens Simon Strom wrote: > Hello Frieder, > Your plots look better now. You can avoid overlapping of measurement numbers by sawtooth stacking them. See example code below. > > xdel(); > //Generating dummy measurements x,y > dx=0.5:50; > x=cumsum(dx); > y=sind(x); > nM=length(x);//number of measurements > plot(x,y,'r') > plot(x,y,'b+') > //Plotting the measurement numbers in stacks to avoid overlapping > nstack=6;//number of stacked measurement numbers > hstack=0.2;//height of measurement number stack (relative to window height) > ybase=-0.9; //base ordinate for measurement numbers > yspan=max(y)-min(y); > for m=1:nM//measurement number > xstring(x(m),ybase+(modulo(m,nstack)-1)*hstack*yspan/nstack,string(m)) > end > Kind regards > Jens > ------------------------------------------------------------------------------------------------------------------------------ > > Am 12.10.2016 10:52, schrieb Frieder Nikolaisen: > >> Hello, >> >> thank you for all the feedback and help. It's really great. >> >> I used the idea of Jens Simon Strom combined with some help from last week: >> >> //Datens?tze >> x1 = (A(:,1) - A(1,1)) * 24 * 3600; >> y1 = A(:,y_1); >> y2 = A(:,y_2); >> y3 = A(:,y_3); >> drawlater() >> >> subplot(3, 1, 1) >> co = color("green"); >> plot2d(x1, y1, co); >> a = gca(); >> b.font_color = co; >> a.foreground = co; >> ylabel(string(kT(y_1)),"color",co) >> a.x_location = 'top'; >> >> subplot(3, 1, 2) >> co = color("blue"); >> plot2d(x1, y2, co); >> b = gca(); >> b.font_color = co; >> b.foreground = co; >> ylabel(string(kT(y_2)),"color",co) >> b.axes_visible(1) = "off"; >> //b.marings = [0.1 0.1 0.3 0.5]; >> //b.filled = "off"; >> subplot(3, 1, 3) >> co=color("red"); >> plot2d(x1, y3, co); >> c = gca(); >> c.font_color = co; >> c.foreground = co; >> //c.axes_visible(1) = "off"; >> ylabel(string(kT(y_3)),"color",co) >> //xlabel(string('Zeit [Sekunden]'), co) >> x= (A(:,1) - A(1,1)) * 24 * 3600; >> for k=1:A_size(1,1) //Beschriftung >> xstring(x(k),x(1),string(k)) // x(1) always 0 >> // xstring(x,y,str,[angle,[box]]) >> disp(x(1)) >> end >> //c.marings = [0.1 0.1 0.5 0.3]; >> //c.filled = "off"; >> >> drawnow() >> >> The printed plots are attached. I did plot different paramters, as I can choose then in my GUI. >> >> That works well: >> >> * Three plots, having the same x axis. >> * x axis on the top and bottom >> * Line NUMBERS FITTING THE X AXIS. >> >> That does not work: >> >> * showing a FEW LINE NUMBERS only, for reading (best case: Fitting the automatic shown times in sec >> >> Problem: I cannot tell, how many datapoints there are going to be. So it mus be choosen automaticly. >> >> Best regards >> >> Frieder >> >> On 2016-10-11 21:04, Samuel Gougeon wrote: >> >>> Hello, >>> >>> Le 11/10/2016 14:46, Rafael Guerra a ?crit : >>> >>>> Hi, >>>> >>>> I was not able to follow the whole discussion >>> Neither did i, >>> >>>> but concerning your subplot challenge: "_? I cannot add a second x-axis in a subplot by newaxis(). How to add a x-axis by using subplot?_" and your last example, >>>> >>>> Couldn't you add a 4th subplot at the bottom in order to plot the 2ndx-axis (say by plotting only zeros)? >>> . >>> Why not using drawaxis() as already suggested? drawaxis() is made for this kind of situation. >>> In this thread, no logarithmic axis is involved. So i do to catch the reason of ignoring drawaxis(). >>> >>> By the way, IMO, a drawing of what exactly is required would be clearer than hundred of lines of description, with schematic curves, axes, arrows linking curves to their multiple axes in x and y. >>> >>> BR >>> Samuel Gougeon >> >> _______________________________________________ >> 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: subplot_with_line_number_1_stacks.gif Type: image/gif Size: 8609 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: subplot_with_line_number_2_stacks.gif Type: image/gif Size: 10946 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: subplot_with_line_number_2_tenth.gif Type: image/gif Size: 10016 bytes Desc: not available URL: From p.muehlmann at gmail.com Wed Oct 12 14:16:21 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Wed, 12 Oct 2016 14:16:21 +0200 Subject: [Scilab-users] inserting data into a bigger matrix Message-ID: Dear Scialb users, how to insert time based data into a pre-defined Matrix without using a for-loop? The data points are not equally spaced in time. example: // assuming DATA includes 5 data Points // each dat Point consists of 4 variable // first variable = time //datafile could look like Time, Var1, Var2, Var3 0, 0, 0, 1 10, 0, 3, 1 15, 30, 0, 1 18, 0, 45, 0 36, 57, 28, 0 Assume that a timestep of 1 second is wanted. desired result should look like this: M = 0 0 0 1 1 0 0 0 2 0 0 0 3 0 0 0. ... 10 0 3 1 ... 15 30 0 1 ... 18 0 45 0 ... 36 57 28 0 so "M" is bigger than the original dataset. Again, I think I could do this using for-loops. This could be OK for small dataset, but maybe become slow for huge data sets (> 100'000 data points). Thanks, Philipp Thanks, 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 jrafaelbguerra at hotmail.com Wed Oct 12 14:45:08 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 12 Oct 2016 12:45:08 +0000 Subject: [Scilab-users] inserting data into a bigger matrix In-Reply-To: References: Message-ID: Hi Philipp, Does the simple code here below meet the requirements? I = [0,0,0,1; 10, 0, 3, 1;15, 30, 0, 1;18, 0, 45, 0;36, 57, 28, 0]; ix1=I(1,1); ix2=I($,1); ix=ix1:ix2; M=zeros(length(ix),4); M(1:$,1) = ix'; M(I(:,1)+1,:)=I; PS: It should be easy to adapt it for a general time series consisting of floats and constant time-sampling. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Philipp M?hlmann Sent: Wednesday, October 12, 2016 2:16 PM To: International users mailing list for Scilab. Subject: [Scilab-users] inserting data into a bigger matrix Dear Scialb users, how to insert time based data into a pre-defined Matrix without using a for-loop? The data points are not equally spaced in time. example: // assuming DATA includes 5 data Points // each dat Point consists of 4 variable // first variable = time //datafile could look like Time, Var1, Var2, Var3 0, 0, 0, 1 10, 0, 3, 1 15, 30, 0, 1 18, 0, 45, 0 36, 57, 28, 0 Assume that a timestep of 1 second is wanted. desired result should look like this: M = 0 0 0 1 1 0 0 0 2 0 0 0 3 0 0 0. ... 10 0 3 1 ... 15 30 0 1 ... 18 0 45 0 ... 36 57 28 0 so "M" is bigger than the original dataset. Again, I think I could do this using for-loops. This could be OK for small dataset, but maybe become slow for huge data sets (> 100'000 data points). Thanks, Philipp Thanks, 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 p.muehlmann at gmail.com Wed Oct 12 14:54:57 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Wed, 12 Oct 2016 14:54:57 +0200 Subject: [Scilab-users] inserting data into a bigger matrix In-Reply-To: References: Message-ID: charming...exactly what I need. 2016-10-12 14:45 GMT+02:00 Rafael Guerra : > Hi Philipp, > > > > Does the simple code here below meet the requirements? > > > > I = [0,0,0,1; 10, 0, 3, 1;15, 30, 0, 1;18, 0, 45, 0;36, 57, 28, 0]; > > ix1=I(1,1); > > ix2=I($,1); > > ix=ix1:ix2; > > M=zeros(length(ix),4); > > M(1:$,1) = ix'; > > M(I(:,1)+1,:)=I; > > > > PS: > > It should be easy to adapt it for a general time series consisting of > floats and constant time-sampling. > > > > Regards, > > Rafael > > > > *From:* users [mailto:users-bounces at lists.scilab.org] *On Behalf Of *Philipp > M?hlmann > *Sent:* Wednesday, October 12, 2016 2:16 PM > *To:* International users mailing list for Scilab. > > *Subject:* [Scilab-users] inserting data into a bigger matrix > > > > Dear Scialb users, > > > > > > how to insert time based data into a pre-defined Matrix without using a > for-loop? > > > > The data points are not equally spaced in time. > > > > > > example: > > // assuming DATA includes 5 data Points > > // each dat Point consists of 4 variable > > // first variable = time > > > > //datafile could look like > > > > Time, Var1, Var2, Var3 > > 0, 0, 0, 1 > > 10, 0, 3, 1 > > 15, 30, 0, 1 > > 18, 0, 45, 0 > > 36, 57, 28, 0 > > > > Assume that a timestep of 1 second is wanted. > > > > desired result should look like this: > > > > M = > > 0 0 0 1 > > 1 0 0 0 > > 2 0 0 0 > > 3 0 0 0. > > ... > > 10 0 3 1 > > ... > > 15 30 0 1 > > ... > > 18 0 45 0 > > ... > > 36 57 28 0 > > > > so "M" is bigger than the original dataset. > > > > Again, I think I could do this using for-loops. > > This could be OK for small dataset, but maybe become slow for huge data > sets (> 100'000 data points). > > > > Thanks, > > Philipp > > > > > > > > > > Thanks, > > Philipp > > > > > > > > > > -- > > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > > > There we have the salad. > > _______________________________________________ > 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 denis.crete at thalesgroup.com Wed Oct 12 15:32:07 2016 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Wed, 12 Oct 2016 15:32:07 +0200 Subject: [Scilab-users] inserting data into a bigger matrix In-Reply-To: References: Message-ID: <8F1D40232A0E68409E3FC23A30C3266201744C6C282B@THSONEA01CMS04P.one.grp> Hello, Assuming input data are stored in I = [0,0,0,1; 10, 0, 3, 1;15, 30, 0, 1;18, 0, 45, 0;36, 57, 28, 0]; there might be also a solution using the ?sparse? function: Nb_Dat=size(I); Time= I(:,1); ij=[1+ones(Nb_Dat(2),1).*.Time,(1:Nb_Dat(2))'.*.ones(Time)] ; sp=sparse(ij,I); // Display full Matrix full(sp) and it may be more efficient (?) writing it on a single line: sp2=sparse([1+ones(size(I,'c'),1).*. I(:,1),(1: size(I,'c'))'.*.ones(I(:,1))],I); HTH. Denis De : users [mailto:users-bounces at lists.scilab.org] De la part de Philipp M?hlmann Envoy? : mercredi 12 octobre 2016 14:55 ? : Users mailing list for Scilab Objet : Re: [Scilab-users] inserting data into a bigger matrix charming...exactly what I need. 2016-10-12 14:45 GMT+02:00 Rafael Guerra >: Hi Philipp, Does the simple code here below meet the requirements? I = [0,0,0,1; 10, 0, 3, 1;15, 30, 0, 1;18, 0, 45, 0;36, 57, 28, 0]; ix1=I(1,1); ix2=I($,1); ix=ix1:ix2; M=zeros(length(ix),4); M(1:$,1) = ix'; M(I(:,1)+1,:)=I; PS: It should be easy to adapt it for a general time series consisting of floats and constant time-sampling. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Philipp M?hlmann Sent: Wednesday, October 12, 2016 2:16 PM To: International users mailing list for Scilab. > Subject: [Scilab-users] inserting data into a bigger matrix Dear Scialb users, how to insert time based data into a pre-defined Matrix without using a for-loop? The data points are not equally spaced in time. example: // assuming DATA includes 5 data Points // each dat Point consists of 4 variable // first variable = time //datafile could look like Time, Var1, Var2, Var3 0, 0, 0, 1 10, 0, 3, 1 15, 30, 0, 1 18, 0, 45, 0 36, 57, 28, 0 Assume that a timestep of 1 second is wanted. desired result should look like this: M = 0 0 0 1 1 0 0 0 2 0 0 0 3 0 0 0. ... 10 0 3 1 ... 15 30 0 1 ... 18 0 45 0 ... 36 57 28 0 so "M" is bigger than the original dataset. Again, I think I could do this using for-loops. This could be OK for small dataset, but maybe become slow for huge data sets (> 100'000 data points). Thanks, Philipp Thanks, Philipp -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. _______________________________________________ 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 j.s.strom at hslmg.de Wed Oct 12 18:16:20 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Wed, 12 Oct 2016 18:16:20 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <8561ba4baf28602c5ff7a56f3fbbf0f8@mail.student.hs-rm.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> <57FD37C3.4030801@free.fr> <606fa9c9d24e7fc4ec0e39195918ab4d@mail.student.hs-rm.de> <57FE06FB.5070606@hslmg.de> <8561ba4baf28602c5ff7a56f3fbbf0f8@mail.student.hs-rm.de> Message-ID: <57FE61D4.8070402@hslmg.de> Hallo Frieder, You can independently combine stack and skip of the measurement numbers by the code below. //Plotting measurement numbers with optional gaps and optional stacking to avoid overlapping //Generating dummy measurement data x,y and plotting them dx=0.5:50;// increment of x x=cumsum(dx); y=sind(x); yspan=max(y)-min(y); nM=length(x);//number of measurements xdel(); plot(x,y,'r') plot(x,y,'b+') //Input parameters for plotting the measurement numbers with optional gaps and stacking to avoid overlapping nstack=6;//maximum number of stacked measurement numbers hstack=0.1;//height of measurement number stack (relative to span). hstack=0: no stacking independent of nstack ybase=-1; //base ordinate for measurement numbers step=2;// step=1: no gap, step=2: every second measurement number, etc. //Writing measurement numbers M=1:step:nM;//opted measurement numbers for m=1:length(M) xstring(x(M(m)),ybase+(modulo(M(m),nstack))*hstack*yspan/nstack,string(M(m))) end "How can I move the lettering above the plot (or at least to the bottom, next to the x-axis)?" By data_bounds (see axes_properties in the help pages) you can enlarge the y-axis beyond the y data span at will.The y-level of the lettering is controlled by the input variable 'ybase' (see code above). Kind regards Jens --------------------------------------------------------------------------------------------------------------------------------- Am 12.10.2016 14:01, schrieb Frieder Nikolaisen: > > Hello everybody, > > I did solve the Problem with showing only 10 line numbers, by using IF. > > printer=1 > for k=1:A_size(1,1) //Beschriftung > *if k>A_size(1,1)*(printer/10) then* > printer = printer + 1 > xstring(x(k),y3(1),string(k)) > // xstring(x,y,str,[angle,[box]]) > end > set(handles.Anzeige, 'string', 'Diagrammbeschriftung' + string(k) + ' von' + string(A_size(1,1))) > end > > The line numbering is connected to the y-axis. How can I move the lattering aboth the plot (or at least the bottom, next to the x-axis)? (attached plot: subplot_with_line_number_2_tenth.gif) > > About Jens help: > I attached three plots: the stacks Picture are with the Code of Jens. Stacking is really nice, but I do not need every line number. With 921 data Points, it is already unreadable again. But thanks for your ideas, the Code is great for learningn anyway. > > Cheers > Frieder > > On 2016-10-12 11:48, Jens Simon Strom wrote: > >> Hello Frieder, >> Your plots look better now. You can avoid overlapping of measurement >> numbers by sawtooth stacking them. See example code below. >> xdel(); >> //Generating dummy measurements x,y >> dx=0.5:50; >> x=cumsum(dx); >> y=sind(x); >> nM=length(x);//number of measurements >> plot(x,y,'r') >> plot(x,y,'b+') >> //Plotting the measurement numbers in stacks to avoid overlapping >> nstack=6;//number of stacked measurement numbers >> hstack=0.2;//height of measurement number stack (relative to window height) >> ybase=-0.9; //base ordinate for measurement numbers >> yspan=max(y)-min(y); >> for m=1:nM//measurement number >> xstring(x(m),ybase+(modulo(m,nstack)-1)*hstack*yspan/nstack,string(m)) >> end >> Kind regards >> Jens >> ------------------------------------------------------------------------------------------------------------------------------ >> Am 12.10.2016 10:52, schrieb Frieder Nikolaisen: >>> >>> Hello, >>> >>> thank you for all the feedback and help. It's really great. >>> >>> I used the idea of Jens Simon Strom combined with some help from >>> last week: >>> >>> //Datens?tze >>> x1 = (A(:,1) - A(1,1)) * 24 * 3600; >>> y1 = A(:,y_1); >>> y2 = A(:,y_2); >>> y3 = A(:,y_3); >>> drawlater() >>> >>> subplot(3, 1, 1) >>> co = color("green"); >>> plot2d(x1, y1, co); >>> a = gca(); >>> b.font_color = co; >>> a.foreground = co; >>> ylabel(string(kT(y_1)),"color",co) >>> a.x_location = 'top'; >>> >>> subplot(3, 1, 2) >>> co = color("blue"); >>> plot2d(x1, y2, co); >>> b = gca(); >>> b.font_color = co; >>> b.foreground = co; >>> ylabel(string(kT(y_2)),"color",co) >>> b.axes_visible(1) = "off"; >>> //b.marings = [0.1 0.1 0.3 0.5]; >>> //b.filled ="off"; >>> subplot(3, 1, 3) >>> co=color("red"); >>> plot2d(x1, y3, co); >>> c = gca(); >>> c.font_color = co; >>> c.foreground = co; >>> //c.axes_visible(1) ="off"; >>> ylabel(string(kT(y_3)),"color",co) >>> //xlabel(string('Zeit [Sekunden]'), co) >>> x= (A(:,1) - A(1,1)) * 24 * 3600; >>> for k=1:A_size(1,1) //Beschriftung >>> xstring(x(k),x(1),string(k)) // x(1) always 0 >>> // xstring(x,y,str,[angle,[box]]) >>> disp(x(1)) >>> end >>> //c.marings = [0.1 0.1 0.5 0.3]; >>> //c.filled ="off"; >>> >>> drawnow() >>> >>> >>> The printed plots are attached. I did plot different paramters, as I can choose then in my GUI. >>> That works well: >>> >>> * Three plots, having the same x axis. >>> * x axis on the top and bottom >>> * Line *numbers Fitting the x axis*. >>> >>> That does not work: >>> >>> * showing a *few line numbers* only, for reading (best case: >>> Fitting the automatic shown times in sec >>> >>> Problem: I cannot tell, how many datapoints there are going to be. >>> So it mus be choosen automaticly. >>> >>> Best regards >>> >>> Frieder >>> >>> On 2016-10-11 21:04, Samuel Gougeon wrote: >>> >>> Hello, >>> >>> Le 11/10/2016 14:46, Rafael Guerra a ?crit : >>> >>> Hi, >>> >>> I was not able to follow the whole discussion >>> >>> Neither did i, >>> >>> but concerning your subplot challenge: "/... I cannot add a >>> second x-axis in a subplot by newaxis(). How to add a x-axis >>> by using subplot?/"and your last example, >>> >>> Couldn't you add a 4^th subplot at the bottom in order to >>> plot the 2^nd x-axis (say by plotting only zeros)? >>> >>> . >>> Why not using drawaxis() as already suggested? drawaxis() is >>> made for this kind of situation. >>> In this thread, no logarithmic axis is involved. So i do to >>> catch the reason of ignoring drawaxis(). >>> >>> By the way, IMO, a drawing of what exactly is required would be >>> clearer than hundred of lines of description, with schematic >>> curves, axes, arrows linking curves to their multiple axes in x >>> and y. >>> >>> BR >>> Samuel Gougeon >>> >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabriel.gga at gmail.com Wed Oct 12 19:00:51 2016 From: gabriel.gga at gmail.com (gabrielgga) Date: Wed, 12 Oct 2016 10:00:51 -0700 (MST) Subject: [Scilab-users] Linearizing a control system using "lin" (porting from MATLAB) Message-ID: <1476291651853-4034786.post@n3.nabble.com> I am currently trying to port some of my MATLAB code to Scilab. To linearize odes in MATLAB, I have created a set of symbolic variables and expressions and computed the jacobians so I could later use them in ss2tf() and the use lsim to simulate the system's response to a series of step inputs. Relevant MATLAB code (the full code is at http://pastebin.ca/3727857 (comments in portuguese): % Linearization % Symbolic variables syms s_f_e s_T_e s_f_t s_T_t_e... s_Cp s_Cp_t s_rho s_rho_t s_Area s_Area_t s_V_t s_U s_Cv % State variables syms s_h s_T s_T_t % State arrays u = [s_f_e s_T_e s_f_t]; x = [s_h s_T s_T_t]; % States % h F1 = (s_f_e - s_Cv*sqrt(s_h))/s_Area; % T F2 = ((s_f_e/s_h)*(s_T_e-s_T) + ... (s_U*s_Area_t/(s_rho*s_Cp*s_h))*(s_T_t-s_T))/s_Area; % T_t F3 = (s_f_t*(s_T_t_e-s_T_t) - ... (s_U*s_Area_t/(s_rho_t*s_Cp_t))*(s_T_t-s_T))/s_V_t; F = [F1 F2 F3]; % Outputs G = [s_h s_T s_T_t]; % Jacobian A.sym = jacobian(F,x); B.sym = jacobian(F,u); C.sym = jacobian(G,x); D.sym = jacobian(G,u); % manipulating A, B, C, D to get numeric values, using ss2tf to get transfer functions % Linear system response to steps in input f_e dt = 0.1; tf = 60; t = 0:dt:tf; amp = 0.2*f_e_bar; % u consists of two steps at times st_f_e(1) and st_f_e(2) with amplitude amp and -amp u = [zeros(st_f_e(1)/dt,1);... amp*ones((st_f_e(2) - st_f_e(1))/dt, 1);... zeros((tf - st_f_e(2))/dt + 1,1)]; figure(1); % h y = lsim(h_fe,u,t) + h_0; subplot(3,1,1); plot(t,y,'--r'); I understand Scilab doens't support symbolic mathematics, so after a bit of research I have this: // Linearization // State arrays u = [f_e_bar T_e_bar f_t_bar]'; x = [h_0 T_0 T_t_0]'; // States function [y,xdot] = f(u,x) // Process parameters Cp = 0.75; // kJ/kg*K Cp_t = 1; // kJ/kg*K rho = 1094; // kg/m? rho_t = 1194; // kg/m? Area = 2; // m? Area_t = 1.5; // m? V_t = 5; // m? U = 150; // kJ/m?*s*K Cv = 4; // constante da v?lvula T_t_e_bar = 540; // K // h xdot(1) = (u(1) - Cv*sqrt(x(1)))/Area; // T xdot(2) = ((u(1)/x(1))*(u(2)-x(2)) + ... (U*Area_t/(rho*Cp*x(1)))*(x(3)-x(2)))/Area; // T_e xdot(3) = (u(3)*(T_t_e_bar-x(3)) - ... (U*Area_t/(rho_t*Cp_t))*(x(3)-x(2)))/V_t; y = x; endfunction [A,B,C,D] = lin(f,u,x) sys = syslin('c',A,B,C,D,x); // f_e h = ss2tf(sys); h_fe = h(1,1); // Resposta do sistema linear (f_e) dt = 0.1; tf = 60; t = [0:dt:tf]; amp = 0.2*f_e_bar; u = [zeros(st_f_e(1)/dt,1);... amp*ones((st_f_e(2) - st_f_e(1))/dt, 1);... zeros((tf - st_f_e(2))/dt + 1,1)]'; // h y = csim(u,t,h_fe) + h_0; figure(1); subplot(3,1,1); plot(t,y,'--r'); However, the output is completely wrong. I suspect the main problem is in the function f(u,x) I pass to lin(). Is this the way to linearize a non-linear system of odes? Is there a simpler one? -- View this message in context: http://mailinglists.scilab.org/Linearizing-a-control-system-using-lin-porting-from-MATLAB-tp4034786.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From j.s.strom at hslmg.de Wed Oct 12 20:15:58 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Wed, 12 Oct 2016 20:15:58 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57FE61D4.8070402@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> <57FD37C3.4030801@free.fr> <606fa9c9d24e7fc4ec0e39195918ab4d@mail.student.hs-rm.de> <57FE06FB.5070606@hslmg.de> <8561ba4baf28602c5ff7a56f3fbbf0f8@mail.student.hs-rm.de> <57FE61D4.8070402@hslmg.de> Message-ID: <57FE7DDE.1020107@hslmg.de> Hallo Frieder, If you insert plot(x(M),y(M),'go') after //Writing measurement numbers you get circle marks at the selected points to ease their correlation to the measurement number. Kind regards Jens ----------------------------------------------------------- Am 12.10.2016 18:16, schrieb Jens Simon Strom: > Hallo Frieder, > You can independently combine stack and skip of the measurement > numbers by the code below. > //Plotting measurement numbers with optional gaps and optional stacking to avoid overlapping > //Generating dummy measurement data x,y and plotting them > dx=0.5:50;// increment of x > x=cumsum(dx); > y=sind(x); > yspan=max(y)-min(y); > nM=length(x);//number of measurements > xdel(); > plot(x,y,'r') > plot(x,y,'b+') > > //Input parameters for plotting the measurement numbers with optional gaps and stacking to avoid overlapping > nstack=6;//maximum number of stacked measurement numbers > hstack=0.1;//height of measurement number stack (relative to span). hstack=0: no stacking independent of nstack > ybase=-1; //base ordinate for measurement numbers > step=2;// step=1: no gap, step=2: every second measurement number, etc. > > //Writing measurement numbers > M=1:step:nM;//opted measurement numbers > for m=1:length(M) > xstring(x(M(m)),ybase+(modulo(M(m),nstack))*hstack*yspan/nstack,string(M(m))) > end > > "How can I move the lettering above the plot (or at least to the bottom, next to the x-axis)?" > By data_bounds (see axes_properties in the help pages) you can enlarge the y-axis beyond the y data span at will.The y-level of the lettering is controlled by the input variable 'ybase' (see code above). > > Kind regards > Jens > --------------------------------------------------------------------------------------------------------------------------------- > > Am 12.10.2016 14:01, schrieb Frieder Nikolaisen: >> >> Hello everybody, >> >> I did solve the Problem with showing only 10 line numbers, by using IF. >> >> printer=1 >> for k=1:A_size(1,1) //Beschriftung >> *if k>A_size(1,1)*(printer/10) then* >> printer = printer + 1 >> xstring(x(k),y3(1),string(k)) >> // xstring(x,y,str,[angle,[box]]) >> end >> set(handles.Anzeige, 'string', 'Diagrammbeschriftung' + string(k) + ' von' + string(A_size(1,1))) >> end >> >> The line numbering is connected to the y-axis. How can I move the lattering aboth the plot (or at least the bottom, next to the x-axis)? (attached plot: subplot_with_line_number_2_tenth.gif) >> >> About Jens help: >> I attached three plots: the stacks Picture are with the Code of Jens. Stacking is really nice, but I do not need every line number. With 921 data Points, it is already unreadable again. But thanks for your ideas, the Code is great for learningn anyway. >> >> Cheers >> Frieder >> >> On 2016-10-12 11:48, Jens Simon Strom wrote: >> >>> Hello Frieder, >>> Your plots look better now. You can avoid overlapping of measurement >>> numbers by sawtooth stacking them. See example code below. >>> xdel(); >>> //Generating dummy measurements x,y >>> dx=0.5:50; >>> x=cumsum(dx); >>> y=sind(x); >>> nM=length(x);//number of measurements >>> plot(x,y,'r') >>> plot(x,y,'b+') >>> //Plotting the measurement numbers in stacks to avoid overlapping >>> nstack=6;//number of stacked measurement numbers >>> hstack=0.2;//height of measurement number stack (relative to window height) >>> ybase=-0.9; //base ordinate for measurement numbers >>> yspan=max(y)-min(y); >>> for m=1:nM//measurement number >>> xstring(x(m),ybase+(modulo(m,nstack)-1)*hstack*yspan/nstack,string(m)) >>> end >>> Kind regards >>> Jens >>> ------------------------------------------------------------------------------------------------------------------------------ >>> Am 12.10.2016 10:52, schrieb Frieder Nikolaisen: >>>> >>>> Hello, >>>> >>>> thank you for all the feedback and help. It's really great. >>>> >>>> I used the idea of Jens Simon Strom combined with some help from >>>> last week: >>>> >>>> //Datens?tze >>>> x1 = (A(:,1) - A(1,1)) * 24 * 3600; >>>> y1 = A(:,y_1); >>>> y2 = A(:,y_2); >>>> y3 = A(:,y_3); >>>> drawlater() >>>> >>>> subplot(3, 1, 1) >>>> co = color("green"); >>>> plot2d(x1, y1, co); >>>> a = gca(); >>>> b.font_color = co; >>>> a.foreground = co; >>>> ylabel(string(kT(y_1)),"color",co) >>>> a.x_location = 'top'; >>>> >>>> subplot(3, 1, 2) >>>> co = color("blue"); >>>> plot2d(x1, y2, co); >>>> b = gca(); >>>> b.font_color = co; >>>> b.foreground = co; >>>> ylabel(string(kT(y_2)),"color",co) >>>> b.axes_visible(1) = "off"; >>>> //b.marings = [0.1 0.1 0.3 0.5]; >>>> //b.filled ="off"; >>>> subplot(3, 1, 3) >>>> co=color("red"); >>>> plot2d(x1, y3, co); >>>> c = gca(); >>>> c.font_color = co; >>>> c.foreground = co; >>>> //c.axes_visible(1) ="off"; >>>> ylabel(string(kT(y_3)),"color",co) >>>> //xlabel(string('Zeit [Sekunden]'), co) >>>> x= (A(:,1) - A(1,1)) * 24 * 3600; >>>> for k=1:A_size(1,1) //Beschriftung >>>> xstring(x(k),x(1),string(k)) // x(1) always 0 >>>> // xstring(x,y,str,[angle,[box]]) >>>> disp(x(1)) >>>> end >>>> //c.marings = [0.1 0.1 0.5 0.3]; >>>> //c.filled ="off"; >>>> >>>> drawnow() >>>> >>>> >>>> The printed plots are attached. I did plot different paramters, as I can choose then in my GUI. >>>> That works well: >>>> >>>> * Three plots, having the same x axis. >>>> * x axis on the top and bottom >>>> * Line *numbers Fitting the x axis*. >>>> >>>> That does not work: >>>> >>>> * showing a *few line numbers* only, for reading (best case: >>>> Fitting the automatic shown times in sec >>>> >>>> Problem: I cannot tell, how many datapoints there are going to be. >>>> So it mus be choosen automaticly. >>>> >>>> Best regards >>>> >>>> Frieder >>>> >>>> On 2016-10-11 21:04, Samuel Gougeon wrote: >>>> >>>> Hello, >>>> >>>> Le 11/10/2016 14:46, Rafael Guerra a ?crit : >>>> >>>> Hi, >>>> >>>> I was not able to follow the whole discussion >>>> >>>> Neither did i, >>>> >>>> but concerning your subplot challenge: "/... I cannot add a >>>> second x-axis in a subplot by newaxis(). How to add a >>>> x-axis by using subplot?/"and your last example, >>>> >>>> Couldn't you add a 4^th subplot at the bottom in order to >>>> plot the 2^nd x-axis (say by plotting only zeros)? >>>> >>>> . >>>> Why not using drawaxis() as already suggested? drawaxis() is >>>> made for this kind of situation. >>>> In this thread, no logarithmic axis is involved. So i do to >>>> catch the reason of ignoring drawaxis(). >>>> >>>> By the way, IMO, a drawing of what exactly is required would be >>>> clearer than hundred of lines of description, with schematic >>>> curves, axes, arrows linking curves to their multiple axes in x >>>> and y. >>>> >>>> BR >>>> Samuel Gougeon >>>> >>>> >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users at lists.scilab.org >>>> http://lists.scilab.org/mailman/listinfo/users >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at wescottdesign.com Wed Oct 12 20:19:31 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Wed, 12 Oct 2016 11:19:31 -0700 Subject: [Scilab-users] Linearizing a control system using "lin" (porting from MATLAB) In-Reply-To: <1476291651853-4034786.post@n3.nabble.com> References: <1476291651853-4034786.post@n3.nabble.com> Message-ID: <1476296371.4530.21.camel@Servo> No answers, because you've just taught me about the existence of 'lin' -- but here are some thoughts and questions: First - I don't see where you're putting parameter values into Matlab's symbolic variables to get an answer. Is this done interactively or something? Second - I just tried lin with a very simple system (xdot = (x + u)^2, y = x). It seems to work, although it didn't get the values exactly and I don't see a way to control the precision of the numerical derivative that gets taken under the hood. It may be productive to try out some simpler systems and see where you're going wrong. Alternately, to test your function definition, you could modify it to work with the ODE solver and see if you get the expected behavior out of it. Third - What's "completely wrong" -- what should the thing be doing, and what is it doing? I assume that Matlab is working correctly, with some cross-check to reality, and Scilab isn't. If you don't mind working with two applications, Maxima would do the symbolic calculations that you're calling out, and the answers could be transferred to Scilab. Unfortunately the syntax is considerably different, so you'd have two learning curves instead of one. At one point there was an integration of Maxima into Scilab, but I don't know how well it worked, or if it's still being supported. I haven't gone this far down the automation road with Scilab, but I'm 99.44% sure that you can write a Maxima script that does the symbolic calculation and spits out some Scilab code, then call Maxima from Scilab, execute the Scilab code, and have a system. It's much more horribly indirect than what Matlab appears to be doing for you, though. On Wed, 2016-10-12 at 10:00 -0700, gabrielgga wrote: > I am currently trying to port some of my MATLAB code to Scilab. > > To linearize odes in MATLAB, I have created a set of symbolic variables and > expressions and computed the jacobians so I could later use them in ss2tf() > and the use lsim to simulate the system's response to a series of step > inputs. > > Relevant MATLAB code (the full code is at http://pastebin.ca/3727857 > (comments in portuguese): > > % Linearization > > % Symbolic variables > syms s_f_e s_T_e s_f_t s_T_t_e... > s_Cp s_Cp_t s_rho s_rho_t s_Area s_Area_t s_V_t s_U s_Cv > > % State variables > syms s_h s_T s_T_t > > % State arrays > u = [s_f_e s_T_e s_f_t]; > x = [s_h s_T s_T_t]; > > % States > % h > F1 = (s_f_e - s_Cv*sqrt(s_h))/s_Area; > % T > F2 = ((s_f_e/s_h)*(s_T_e-s_T) + ... > (s_U*s_Area_t/(s_rho*s_Cp*s_h))*(s_T_t-s_T))/s_Area; > % T_t > F3 = (s_f_t*(s_T_t_e-s_T_t) - ... > (s_U*s_Area_t/(s_rho_t*s_Cp_t))*(s_T_t-s_T))/s_V_t; > > F = [F1 F2 F3]; > > % Outputs > G = [s_h s_T s_T_t]; > > % Jacobian > A.sym = jacobian(F,x); > B.sym = jacobian(F,u); > C.sym = jacobian(G,x); > D.sym = jacobian(G,u); > > % manipulating A, B, C, D to get numeric values, using ss2tf to get > transfer functions > > % Linear system response to steps in input f_e > dt = 0.1; > tf = 60; > t = 0:dt:tf; > amp = 0.2*f_e_bar; > > % u consists of two steps at times st_f_e(1) and st_f_e(2) with > amplitude amp and -amp > u = [zeros(st_f_e(1)/dt,1);... > amp*ones((st_f_e(2) - st_f_e(1))/dt, 1);... > zeros((tf - st_f_e(2))/dt + 1,1)]; > > figure(1); > > % h > y = lsim(h_fe,u,t) + h_0; > > subplot(3,1,1); > plot(t,y,'--r'); > > > I understand Scilab doens't support symbolic mathematics, so after a bit of > research I have this: > > // Linearization > > // State arrays > > u = [f_e_bar T_e_bar f_t_bar]'; > x = [h_0 T_0 T_t_0]'; > > // States > > function [y,xdot] = f(u,x) > > // Process parameters > Cp = 0.75; // kJ/kg*K > Cp_t = 1; // kJ/kg*K > rho = 1094; // kg/m? > rho_t = 1194; // kg/m? > Area = 2; // m? > Area_t = 1.5; // m? > V_t = 5; // m? > U = 150; // kJ/m?*s*K > Cv = 4; // constante da v?lvula > T_t_e_bar = 540; // K > > // h > xdot(1) = (u(1) - Cv*sqrt(x(1)))/Area; > // T > xdot(2) = ((u(1)/x(1))*(u(2)-x(2)) + ... > (U*Area_t/(rho*Cp*x(1)))*(x(3)-x(2)))/Area; > // T_e > xdot(3) = (u(3)*(T_t_e_bar-x(3)) - ... > (U*Area_t/(rho_t*Cp_t))*(x(3)-x(2)))/V_t; > > y = x; > > endfunction > > [A,B,C,D] = lin(f,u,x) > > sys = syslin('c',A,B,C,D,x); > > // f_e > h = ss2tf(sys); > h_fe = h(1,1); > > // Resposta do sistema linear (f_e) > dt = 0.1; > tf = 60; > t = [0:dt:tf]; > amp = 0.2*f_e_bar; > u = [zeros(st_f_e(1)/dt,1);... > amp*ones((st_f_e(2) - st_f_e(1))/dt, 1);... > zeros((tf - st_f_e(2))/dt + 1,1)]'; > > // h > y = csim(u,t,h_fe) + h_0; > > figure(1); > subplot(3,1,1); > plot(t,y,'--r'); > > However, the output is completely wrong. I suspect the main problem is in > the function f(u,x) I pass to lin(). Is this the way to linearize a > non-linear system of odes? Is there a simpler one? > > > > -- > View this message in context: http://mailinglists.scilab.org/Linearizing-a-control-system-using-lin-porting-from-MATLAB-tp4034786.html > Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. > _______________________________________________ > 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 tim at wescottdesign.com Wed Oct 12 20:25:10 2016 From: tim at wescottdesign.com (Tim Wescott) Date: Wed, 12 Oct 2016 11:25:10 -0700 Subject: [Scilab-users] Question about lin -- why rand()? Message-ID: <1476296710.4530.26.camel@Servo> In responding to the post by "gabrielgga" about system linearization, I looked at the 'lin' script to understand it. It does the linearization by generating a set of random perturbation vectors, perturbing the system, and then numerically solving for the Jacobians. As such, it coughs up a slightly different linearization each time. The linearization is largely accurate, but the difference from ideal is more than I'd (perhaps naively) expect. Why? If this is a well-known technique, please feel free to point me at a paper. -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell: 503.349.8432 From sgougeon at free.fr Wed Oct 12 20:51:37 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 12 Oct 2016 20:51:37 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <8561ba4baf28602c5ff7a56f3fbbf0f8@mail.student.hs-rm.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <57EE77D3.8040100@hslmg.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> <57FD37C3.4030801@free.fr> <606fa9c9d24e7fc4ec0e39195918ab4d@mail.student.hs-rm.de> <57FE06FB.5070606@hslmg.de> <8561ba4baf28602c5ff7a56f3fbbf0f8@mail.student.hs-rm.de> Message-ID: <57FE8639.1010402@free.fr> Hello, It is presently pretty hard to follow common abscissae accross the 3 plots. You might add x grids (vertical lines at the x graduations). See for instance xgrid() or gca().grid: https://help.scilab.org/docs/6.0.0/en_US/xgrid.html https://help.scilab.org/docs/6.0.0/en_US/axes_properties.html BR Samuel Gougeon From contact at pierre-vuillemin.fr Wed Oct 12 22:00:54 2016 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Wed, 12 Oct 2016 22:00:54 +0200 Subject: [Scilab-users] Creation of a library with macros located in various folders Message-ID: Hi all, I am trying to make a function similar to genlib but which goes recursively through folders to find .sci files, compile them and put them in a given target build folder. The idea is that I would like to be able to organize my 'macros' folder while still being able to generate a library. In particular, I would like to have that kind of folder organization : - build - src - sub-folder1 <.sci files> ... - sub-folder n - sub sub folder 1 <.sci files> < .sci files> At the moment, the function (build.sce in the attached file) goes through the folders contained in the initial 'src' folder, performs an 'exec' on the .sci files that are found, and save the corresponding binary files in the target folder 'build' (at the same level as 'src'). It also generates a 'names' file containing the names of the functions in the 'build' folder. Finally, it creates a library with the binary files contained in the 'build' folder. Yet, when I try to use my functions, I get the following error: !--error 999 Overloaded load cannot occur in this context So I guess that there is something wrong with the way I generate my library? My binary files are generated as follows, function_name = strsubst(fi,".sci","") // fi is the full name of the file names_to_write = [names_to_write;function_name] // used later to generate the file containing the names exec(file_path, -1) // file_path is the absolute path to my function save(target_path + function_name + ".bin", function_name) and the names file is generated as, names_file = target_path + "names" [fd, err] = mopen(names_file,"a") mputl(names_to_write, fd) mclose(fd) Best regards, Pierre Vuillemin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: recuBuild.zip Type: application/zip Size: 1593 bytes Desc: not available URL: From Frieder.Nikolaisen at student.hs-rm.de Thu Oct 13 08:43:46 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Thu, 13 Oct 2016 08:43:46 +0200 Subject: [Scilab-users] Fwd: plotxxyyy In-Reply-To: <57FE7DDE.1020107@hslmg.de> References: <29e6564ac2ec5b13312ebd3148e4b773@mail.student.hs-rm.de> <26b7a6eee9d63aa2d15fabebb6333d48@mail.student.hs-rm.de> <57F36A9E.4090206@hslmg.de> <57F61375.1050702@hslmg.de> <8b3b1ce92a62e6b3e2e1b3d91a044d80@mail.student.hs-rm.de> <57F679CC.4010209@hslmg.de> <57F6A5F2.4000709@hslmg.de> <6edfc482-17af-b3a5-211b-36a2e3286a3e@student.hs-rm.de> <3cc78e5fc56e181642a97d829eaf9ad6@mail.student.hs-rm.de> <57FC9889.7090100@hslmg.de> <883f9406e2df0d079d025f2057cbd63d@mail.student.hs-rm.de> <57FD37C3.4030801@free.fr> <606fa9c9d24e7fc4ec0e39195918ab4d@mail.student.hs-rm.de> <57FE06FB.5070606@hslmg.de> <8561ba4baf28602c5ff7a56f3fbbf0f8@mail.student.hs-rm.de> <57FE61D4.8070402@hslmg.de> <57FE7DDE.1020107@hslmg.de> Message-ID: <8c9e492eb1c1d33bde93ff2e630d77d8@mail.student.hs-rm.de> Hi Jens and Samuel, thanks. I am going to include your tips. Best regards Frieder On 2016-10-12 20:15, Jens Simon Strom wrote: > Hallo Frieder, > If you insert > plot(x(M),y(M),'go') after //Writing measurement numbers > > you get circle marks at the selected points to ease their correlation to the measurement number. > > Kind regards > Jens > ----------------------------------------------------------- > > Am 12.10.2016 18:16, schrieb Jens Simon Strom: > >> Hallo Frieder, >> You can independently combine stack and skip of the measurement numbers by the code below. >> >> //Plotting measurement numbers with optional gaps and optional stacking to avoid overlapping >> //Generating dummy measurement data x,y and plotting them >> dx=0.5:50;// increment of x >> x=cumsum(dx); >> y=sind(x); >> yspan=max(y)-min(y); >> nM=length(x);//number of measurements >> xdel(); >> plot(x,y,'r') >> plot(x,y,'b+') >> >> //Input parameters for plotting the measurement numbers with optional gaps and stacking to avoid overlapping >> nstack=6;//maximum number of stacked measurement numbers >> hstack=0.1;//height of measurement number stack (relative to span). hstack=0: no stacking independent of nstack >> ybase=-1; //base ordinate for measurement numbers >> step=2;// step=1: no gap, step=2: every second measurement number, etc. >> >> //Writing measurement numbers >> M=1:step:nM;//opted measurement numbers >> for m=1:length(M) >> xstring(x(M(m)),ybase+(modulo(M(m),nstack))*hstack*yspan/nstack,string(M(m))) >> end >> >> "How can I move the lettering above the plot (or at least to the bottom, next to the x-axis)?" By data_bounds (see axes_properties in the help pages) you can enlarge the y-axis beyond the y data span at will. The y-level of the lettering is controlled by the input variable 'ybase' (see code above). >> >> Kind regards >> Jens >> --------------------------------------------------------------------------------------------------------------------------------- >> >> Am 12.10.2016 14:01, schrieb Frieder Nikolaisen: >> >>> Hello everybody, >>> >>> I did solve the Problem with showing only 10 line numbers, by using IF. >>> >>> printer=1 >>> >>> for k=1:A_size(1,1) //Beschriftung >>> IF K>A_SIZE(1,1)*(PRINTER/10) THEN >>> printer = printer + 1 >>> xstring(x(k),y3(1),string(k)) >>> // xstring(x,y,str,[angle,[box]]) >>> end >>> set(handles.Anzeige, 'string', 'Diagrammbeschriftung ' + string(k) + ' von ' + string(A_size(1,1))) >>> end >>> >>> The line numbering is connected to the y-axis. How can I move the lattering aboth the plot (or at least the bottom, next to the x-axis)? (attached plot: subplot_with_line_number_2_tenth.gif) >>> >>> About Jens help: >>> >>> I attached three plots: the stacks Picture are with the Code of Jens. Stacking is really nice, but I do not need every line number. With 921 data Points, it is already unreadable again. But thanks for your ideas, the Code is great for learningn anyway. >>> >>> Cheers >>> >>> Frieder >>> >>> On 2016-10-12 11:48, Jens Simon Strom wrote: >>> >>>> Hello Frieder, >>>> Your plots look better now. You can avoid overlapping of measurement numbers by sawtooth stacking them. See example code below. >>>> >>>> xdel(); >>>> //Generating dummy measurements x,y >>>> dx=0.5:50; >>>> x=cumsum(dx); >>>> y=sind(x); >>>> nM=length(x);//number of measurements >>>> plot(x,y,'r') >>>> plot(x,y,'b+') >>>> //Plotting the measurement numbers in stacks to avoid overlapping >>>> nstack=6;//number of stacked measurement numbers >>>> hstack=0.2;//height of measurement number stack (relative to window height) >>>> ybase=-0.9; //base ordinate for measurement numbers >>>> yspan=max(y)-min(y); >>>> for m=1:nM//measurement number >>>> xstring(x(m),ybase+(modulo(m,nstack)-1)*hstack*yspan/nstack,string(m)) >>>> end >>>> Kind regards >>>> Jens >>>> ------------------------------------------------------------------------------------------------------------------------------ >>>> >>>> Am 12.10.2016 10:52, schrieb Frieder Nikolaisen: >>>> >>>>> Hello, >>>>> >>>>> thank you for all the feedback and help. It's really great. >>>>> >>>>> I used the idea of Jens Simon Strom combined with some help from last week: >>>>> >>>>> //Datens?tze >>>>> x1 = (A(:,1) - A(1,1)) * 24 * 3600; >>>>> y1 = A(:,y_1); >>>>> y2 = A(:,y_2); >>>>> y3 = A(:,y_3); >>>>> drawlater() >>>>> >>>>> subplot(3, 1, 1) >>>>> co = color("green"); >>>>> plot2d(x1, y1, co); >>>>> a = gca(); >>>>> b.font_color = co; >>>>> a.foreground = co; >>>>> ylabel(string(kT(y_1)),"color",co) >>>>> a.x_location = 'top'; >>>>> >>>>> subplot(3, 1, 2) >>>>> co = color("blue"); >>>>> plot2d(x1, y2, co); >>>>> b = gca(); >>>>> b.font_color = co; >>>>> b.foreground = co; >>>>> ylabel(string(kT(y_2)),"color",co) >>>>> b.axes_visible(1) = "off"; >>>>> //b.marings = [0.1 0.1 0.3 0.5]; >>>>> //b.filled = "off"; >>>>> subplot(3, 1, 3) >>>>> co=color("red"); >>>>> plot2d(x1, y3, co); >>>>> c = gca(); >>>>> c.font_color = co; >>>>> c.foreground = co; >>>>> //c.axes_visible(1) = "off"; >>>>> ylabel(string(kT(y_3)),"color",co) >>>>> //xlabel(string('Zeit [Sekunden]'), co) >>>>> x= (A(:,1) - A(1,1)) * 24 * 3600; >>>>> for k=1:A_size(1,1) //Beschriftung >>>>> xstring(x(k),x(1),string(k)) // x(1) always 0 >>>>> // xstring(x,y,str,[angle,[box]]) >>>>> disp(x(1)) >>>>> end >>>>> //c.marings = [0.1 0.1 0.5 0.3]; >>>>> //c.filled = "off"; >>>>> >>>>> drawnow() >>>>> >>>>> The printed plots are attached. I did plot different paramters, as I can choose then in my GUI. >>>>> >>>>> That works well: >>>>> >>>>> * Three plots, having the same x axis. >>>>> * x axis on the top and bottom >>>>> * Line NUMBERS FITTING THE X AXIS. >>>>> >>>>> That does not work: >>>>> >>>>> * showing a FEW LINE NUMBERS only, for reading (best case: Fitting the automatic shown times in sec >>>>> >>>>> Problem: I cannot tell, how many datapoints there are going to be. So it mus be choosen automaticly. >>>>> >>>>> Best regards >>>>> >>>>> Frieder >>>>> >>>>> On 2016-10-11 21:04, Samuel Gougeon wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> Le 11/10/2016 14:46, Rafael Guerra a ?crit : >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I was not able to follow the whole discussion >>>>>> Neither did i, >>>>>> >>>>>>> but concerning your subplot challenge: "_? I cannot add a second x-axis in a subplot by newaxis(). How to add a x-axis by using subplot?_" and your last example, >>>>>>> >>>>>>> Couldn't you add a 4th subplot at the bottom in order to plot the 2ndx-axis (say by plotting only zeros)? >>>>>> . >>>>>> Why not using drawaxis() as already suggested? drawaxis() is made for this kind of situation. >>>>>> In this thread, no logarithmic axis is involved. So i do to catch the reason of ignoring drawaxis(). >>>>>> >>>>>> By the way, IMO, a drawing of what exactly is required would be clearer than hundred of lines of description, with schematic curves, axes, arrows linking curves to their multiple axes in x and y. >>>>>> >>>>>> BR >>>>>> Samuel Gougeon >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/mailman/listinfo/users >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Oct 13 11:37:48 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 13 Oct 2016 09:37:48 +0000 Subject: [Scilab-users] inserting data into a bigger matrix In-Reply-To: <8F1D40232A0E68409E3FC23A30C3266201744C6C282B@THSONEA01CMS04P.one.grp> References: <8F1D40232A0E68409E3FC23A30C3266201744C6C282B@THSONEA01CMS04P.one.grp> Message-ID: Hi Denis, Thanks for sharing a neat and mind-blowing solution. It is much faster and with huge memory savings. Kind regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of CRETE Denis Sent: Wednesday, October 12, 2016 3:32 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] inserting data into a bigger matrix Hello, Assuming input data are stored in I = [0,0,0,1; 10, 0, 3, 1;15, 30, 0, 1;18, 0, 45, 0;36, 57, 28, 0]; there might be also a solution using the ?sparse? function: Nb_Dat=size(I); Time= I(:,1); ij=[1+ones(Nb_Dat(2),1).*.Time,(1:Nb_Dat(2))'.*.ones(Time)] ; sp=sparse(ij,I); // Display full Matrix full(sp) and it may be more efficient (?) writing it on a single line: sp2=sparse([1+ones(size(I,'c'),1).*. I(:,1),(1: size(I,'c'))'.*.ones(I(:,1))],I); HTH. Denis De : users [mailto:users-bounces at lists.scilab.org] De la part de Philipp M?hlmann Envoy? : mercredi 12 octobre 2016 14:55 ? : Users mailing list for Scilab Objet : Re: [Scilab-users] inserting data into a bigger matrix charming...exactly what I need. 2016-10-12 14:45 GMT+02:00 Rafael Guerra >: Hi Philipp, Does the simple code here below meet the requirements? I = [0,0,0,1; 10, 0, 3, 1;15, 30, 0, 1;18, 0, 45, 0;36, 57, 28, 0]; ix1=I(1,1); ix2=I($,1); ix=ix1:ix2; M=zeros(length(ix),4); M(1:$,1) = ix'; M(I(:,1)+1,:)=I; PS: It should be easy to adapt it for a general time series consisting of floats and constant time-sampling. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Philipp M?hlmann Sent: Wednesday, October 12, 2016 2:16 PM To: International users mailing list for Scilab. > Subject: [Scilab-users] inserting data into a bigger matrix Dear Scialb users, how to insert time based data into a pre-defined Matrix without using a for-loop? The data points are not equally spaced in time. example: // assuming DATA includes 5 data Points // each dat Point consists of 4 variable // first variable = time //datafile could look like Time, Var1, Var2, Var3 0, 0, 0, 1 10, 0, 3, 1 15, 30, 0, 1 18, 0, 45, 0 36, 57, 28, 0 Assume that a timestep of 1 second is wanted. desired result should look like this: M = 0 0 0 1 1 0 0 0 2 0 0 0 3 0 0 0. ... 10 0 3 1 ... 15 30 0 1 ... 18 0 45 0 ... 36 57 28 0 so "M" is bigger than the original dataset. Again, I think I could do this using for-loops. This could be OK for small dataset, but maybe become slow for huge data sets (> 100'000 data points). Thanks, Philipp Thanks, Philipp -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. _______________________________________________ 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 Frieder.Nikolaisen at student.hs-rm.de Thu Oct 13 14:05:00 2016 From: Frieder.Nikolaisen at student.hs-rm.de (Frieder Nikolaisen) Date: Thu, 13 Oct 2016 14:05:00 +0200 Subject: [Scilab-users] Fwd: Re: Fwd: plotxxyyy Message-ID: <84df568b42b0935da65e562194da8434@mail.student.hs-rm.de> Dear community, thank you for you support. I get now wonderful plots. There is still a feature missing: Plot two has not x grid. HOW TO ADD A GRID WITHOUT A AXIS? (I tried a bit with newaxis... no success) subplot(3, 1, 2) co = color("blue"); plot2d(x1, y2, co); b = gca(); b.font_color = co; b.foreground = co; B.AXES_VISIBLE(1) = "OFF"; XGRID(CO, 1, 10) This code works well now: subplot(3, 1, 3) co=color("red"); plot2d(x1, y3, co); xgrid(co, 1, 10) c = gca(); c.font_color = co; c.foreground = co; c.data_bounds = [min(x1),min(y3); max(x1),max(y3)+(max(y3)-min(y3))*0.45] //c.axes_visible(1) = "off"; ylabel(string(kT(y_3)),"color",co) xlabel('Sekunden') x= (A(:,1) - A(1,1)) * 24 * 3600; //Input parameters for plotting the measurement numbers with optional gaps and stacking to avoid overlapping nstack=5;//maximum number of stacked measurement numbers hstack=0.3;//height of measurement number stack (relative to window height) ybase=max(y3)*1; //base ordinate for measurement numbers yspan=max(y3)-min(y3); plot(x1(M),y3(M), 'ko') // f?gt schwarze dots hinzu for m=1:length(M) //Beschriftung xstring(x1(M(m)),ybase+(modulo(M(m),nstack))*hstack*yspan/nstack,string(M(m))) set(handles.Anzeige, 'string', 'Diagrammbeschriftung ' + string(k) + ' von ' + string(A_size(1,1))) end If I have a few hours nothingelse to do, I will try to solve the prolbem with Denis sparse function. With out using a for loop, it will be faster. Best regards Frieder PS: I wanted to send two plots, but they are 111kB. I plead for a higher limit. On 2016-10-12 20:15, Jens Simon Strom wrote: > Hallo Frieder, > If you insert > plot(x(M),y(M),'go') after //Writing measurement numbers > > you get circle marks at the selected points to ease their correlation to the measurement number. > > Kind regards > Jens > ----------------------------------------------------------- > > Am 12.10.2016 18:16, schrieb Jens Simon Strom: > >> Hallo Frieder, >> You can independently combine stack and skip of the measurement numbers by the code below. >> >> //Plotting measurement numbers with optional gaps and optional stacking to avoid overlapping >> //Generating dummy measurement data x,y and plotting them >> dx=0.5:50;// increment of x >> x=cumsum(dx); >> y=sind(x); >> yspan=max(y)-min(y); >> nM=length(x);//number of measurements >> xdel(); >> plot(x,y,'r') >> plot(x,y,'b+') >> >> //Input parameters for plotting the measurement numbers with optional gaps and stacking to avoid overlapping >> nstack=6;//maximum number of stacked measurement numbers >> hstack=0.1;//height of measurement number stack (relative to span). hstack=0: no stacking independent of nstack >> ybase=-1; //base ordinate for measurement numbers >> step=2;// step=1: no gap, step=2: every second measurement number, etc. >> >> //Writing measurement numbers >> M=1:step:nM;//opted measurement numbers >> for m=1:length(M) >> xstring(x(M(m)),ybase+(modulo(M(m),nstack))*hstack*yspan/nstack,string(M(m))) >> end >> >> "How can I move the lettering above the plot (or at least to the bottom, next to the x-axis)?" By data_bounds (see axes_properties in the help pages) you can enlarge the y-axis beyond the y data span at will. The y-level of the lettering is controlled by the input variable 'ybase' (see code above). >> >> Kind regards >> Jens >> --------------------------------------------------------------------------------------------------------------------------------- >> >> Am 12.10.2016 14:01, schrieb Frieder Nikolaisen: >> >>> Hello everybody, >>> >>> I did solve the Problem with showing only 10 line numbers, by using IF. >>> >>> printer=1 >>> >>> for k=1:A_size(1,1) //Beschriftung >>> IF K>A_SIZE(1,1)*(PRINTER/10) THEN >>> printer = printer + 1 >>> xstring(x(k),y3(1),string(k)) >>> // xstring(x,y,str,[angle,[box]]) >>> end >>> set(handles.Anzeige, 'string', 'Diagrammbeschriftung ' + string(k) + ' von ' + string(A_size(1,1))) >>> end >>> >>> The line numbering is connected to the y-axis. How can I move the lattering aboth the plot (or at least the bottom, next to the x-axis)? (attached plot: subplot_with_line_number_2_tenth.gif) >>> >>> About Jens help: >>> >>> I attached three plots: the stacks Picture are with the Code of Jens. Stacking is really nice, but I do not need every line number. With 921 data Points, it is already unreadable again. But thanks for your ideas, the Code is great for learningn anyway. >>> >>> Cheers >>> >>> Frieder >>> >>> On 2016-10-12 11:48, Jens Simon Strom wrote: >>> >>>> Hello Frieder, >>>> Your plots look better now. You can avoid overlapping of measurement numbers by sawtooth stacking them. See example code below. >>>> >>>> xdel(); >>>> //Generating dummy measurements x,y >>>> dx=0.5:50; >>>> x=cumsum(dx); >>>> y=sind(x); >>>> nM=length(x);//number of measurements >>>> plot(x,y,'r') >>>> plot(x,y,'b+') >>>> //Plotting the measurement numbers in stacks to avoid overlapping >>>> nstack=6;//number of stacked measurement numbers >>>> hstack=0.2;//height of measurement number stack (relative to window height) >>>> ybase=-0.9; //base ordinate for measurement numbers >>>> yspan=max(y)-min(y); >>>> for m=1:nM//measurement number >>>> xstring(x(m),ybase+(modulo(m,nstack)-1)*hstack*yspan/nstack,string(m)) >>>> end >>>> Kind regards >>>> Jens >>>> ------------------------------------------------------------------------------------------------------------------------------ >>>> >>>> Am 12.10.2016 10:52, schrieb Frieder Nikolaisen: >>>> >>>>> Hello, >>>>> >>>>> thank you for all the feedback and help. It's really great. >>>>> >>>>> I used the idea of Jens Simon Strom combined with some help from last week: >>>>> >>>>> //Datens?tze >>>>> x1 = (A(:,1) - A(1,1)) * 24 * 3600; >>>>> y1 = A(:,y_1); >>>>> y2 = A(:,y_2); >>>>> y3 = A(:,y_3); >>>>> drawlater() >>>>> >>>>> subplot(3, 1, 1) >>>>> co = color("green"); >>>>> plot2d(x1, y1, co); >>>>> a = gca(); >>>>> b.font_color = co; >>>>> a.foreground = co; >>>>> ylabel(string(kT(y_1)),"color",co) >>>>> a.x_location = 'top'; >>>>> >>>>> subplot(3, 1, 2) >>>>> co = color("blue"); >>>>> plot2d(x1, y2, co); >>>>> b = gca(); >>>>> b.font_color = co; >>>>> b.foreground = co; >>>>> ylabel(string(kT(y_2)),"color",co) >>>>> b.axes_visible(1) = "off"; >>>>> //b.marings = [0.1 0.1 0.3 0.5]; >>>>> //b.filled = "off"; >>>>> subplot(3, 1, 3) >>>>> co=color("red"); >>>>> plot2d(x1, y3, co); >>>>> c = gca(); >>>>> c.font_color = co; >>>>> c.foreground = co; >>>>> //c.axes_visible(1) = "off"; >>>>> ylabel(string(kT(y_3)),"color",co) >>>>> //xlabel(string('Zeit [Sekunden]'), co) >>>>> x= (A(:,1) - A(1,1)) * 24 * 3600; >>>>> for k=1:A_size(1,1) //Beschriftung >>>>> xstring(x(k),x(1),string(k)) // x(1) always 0 >>>>> // xstring(x,y,str,[angle,[box]]) >>>>> disp(x(1)) >>>>> end >>>>> //c.marings = [0.1 0.1 0.5 0.3]; >>>>> //c.filled = "off"; >>>>> >>>>> drawnow() >>>>> >>>>> The printed plots are attached. I did plot different paramters, as I can choose then in my GUI. >>>>> >>>>> That works well: >>>>> >>>>> * Three plots, having the same x axis. >>>>> * x axis on the top and bottom >>>>> * Line NUMBERS FITTING THE X AXIS. >>>>> >>>>> That does not work: >>>>> >>>>> * showing a FEW LINE NUMBERS only, for reading (best case: Fitting the automatic shown times in sec >>>>> >>>>> Problem: I cannot tell, how many datapoints there are going to be. So it mus be choosen automaticly. >>>>> >>>>> Best regards >>>>> >>>>> Frieder >>>>> >>>>> On 2016-10-11 21:04, Samuel Gougeon wrote: >>>>> >>>>>> Hello, >>>>>> >>>>>> Le 11/10/2016 14:46, Rafael Guerra a ?crit : >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I was not able to follow the whole discussion >>>>>> Neither did i, >>>>>> >>>>>>> but concerning your subplot challenge: "_? I cannot add a second x-axis in a subplot by newaxis(). How to add a x-axis by using subplot?_" and your last example, >>>>>>> >>>>>>> Couldn't you add a 4th subplot at the bottom in order to plot the 2ndx-axis (say by plotting only zeros)? >>>>>> . >>>>>> Why not using drawaxis() as already suggested? drawaxis() is made for this kind of situation. >>>>>> In this thread, no logarithmic axis is involved. So i do to catch the reason of ignoring drawaxis(). >>>>>> >>>>>> By the way, IMO, a drawing of what exactly is required would be clearer than hundred of lines of description, with schematic curves, axes, arrows linking curves to their multiple axes in x and y. >>>>>> >>>>>> BR >>>>>> Samuel Gougeon >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users at lists.scilab.org >>>>> http://lists.scilab.org/mailman/listinfo/users >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: subplot_11.10.16.gif Type: image/gif Size: 29867 bytes Desc: not available URL: From j.s.strom at hslmg.de Thu Oct 13 15:04:14 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 13 Oct 2016 15:04:14 +0200 Subject: [Scilab-users] Fwd: Re: Fwd: plotxxyyy In-Reply-To: <84df568b42b0935da65e562194da8434@mail.student.hs-rm.de> References: <84df568b42b0935da65e562194da8434@mail.student.hs-rm.de> Message-ID: <57FF864E.3000006@hslmg.de> Hi FRieder, The plots look really beautiful. Congratulation! Normally you should always have an axis. To produce a grid without 'grid' ('cax.grid=[1 1]', see 'axes_properties', 'grid' in the help pages) you can use x=0:10; y=-5:5; [X,Y]=ndgrid(x,y); xdel(); plot(X,Y) plot(X',Y') Kind regards Jens .----------------------------------- Am 13.10.2016 14:05, schrieb Frieder Nikolaisen: > > Dear community, > > thank you for you support. I get now wonderful plots. > > There is still a feature missing: Plot two has not x grid. *How to add > a grid without a axis?* (I tried a bit with newaxis... no success) > > subplot(3, 1, 2) > co = color("blue"); > plot2d(x1, y2, co); > b = gca(); > b.font_color = co; > b.foreground = co; > *b.axes_visible(1) = "off"; xgrid(co, 1, 10)* > > > > This code works well now: > subplot(3, 1, 3) > co=color("red"); > plot2d(x1, y3, co); > xgrid(co, 1, 10) > c = gca(); > c.font_color = co; > c.foreground = co; > c.data_bounds = [min(x1),min(y3); max(x1),max(y3)+(max(y3)-min(y3))*0.45] > //c.axes_visible(1) ="off"; > ylabel(string(kT(y_3)),"color",co) > xlabel('Sekunden') > > x= (A(:,1) - A(1,1)) * 24 * 3600; > //Input parameters for plotting the measurement numbers with optional gaps and stacking to avoid overlapping > nstack=5;//maximum number of stacked measurement numbers > hstack=0.3;//height of measurement number stack (relative to window height) > ybase=max(y3)*1; //base ordinate for measurement numbers > yspan=max(y3)-min(y3); > plot(x1(M),y3(M), 'ko') // f?gt schwarze dots hinzu > for m=1:length(M) //Beschriftung > xstring(x1(M(m)),ybase+(modulo(M(m),nstack))*hstack*yspan/nstack,string(M(m))) > set(handles.Anzeige, 'string', 'Diagrammbeschriftung' + string(k) + ' von' + string(A_size(1,1))) > end > > > If I have a few hours nothingelse to do, I will try to solve the prolbem withDenis sparse function. With out using a for loop, it will be faster. > Best regards > Frieder > > PS: I wanted to send two plots, but they are 111kB. I plead for a higher limit. > > > On 2016-10-12 20:15, Jens Simon Strom wrote: > > Hallo Frieder, > If you insert > plot(x(M),y(M),'go') after//Writing measurement numbers > > > you get circle marks at the selected points to ease their correlation to the measurement number. > > Kind regards > Jens > ----------------------------------------------------------- > > > Am 12.10.2016 18:16, schrieb Jens Simon Strom: > > Hallo Frieder, > You can independently combine stack and skip of the > measurement numbers by the code below. > > //Plotting measurement numbers with optional gaps and optional stacking to avoid overlapping > //Generating dummy measurement data x,y and plotting them > dx=0.5:50;// increment of x > x=cumsum(dx); > y=sind(x); > yspan=max(y)-min(y); > nM=length(x);//number of measurements > xdel(); > plot(x,y,'r') > plot(x,y,'b+') > > //Input parameters for plotting the measurement numbers with optional gaps and stacking to avoid overlapping > nstack=6;//maximum number of stacked measurement numbers > hstack=0.1;//height of measurement number stack (relative to span). hstack=0: no stacking independent of nstack > ybase=-1; //base ordinate for measurement numbers > step=2;// step=1: no gap, step=2: every second measurement number, etc. > > //Writing measurement numbers > M=1:step:nM;//opted measurement numbers > for m=1:length(M) > xstring(x(M(m)),ybase+(modulo(M(m),nstack))*hstack*yspan/nstack,string(M(m))) > end > > > "How can I move the lettering above the plot (or at least to the bottom, next to the x-axis)?"By data_bounds (see axes_properties in the help pages) you can enlarge the y-axis beyond the y data span at will.The y-level of the lettering is controlled by the input variable 'ybase' (see code above). > > > Kind regards > Jens > --------------------------------------------------------------------------------------------------------------------------------- > > Am 12.10.2016 14:01, schrieb Frieder Nikolaisen: > > Hello everybody, > > I did solve the Problem with showing only 10 line numbers, > by using IF. > > printer=1 > > for k=1:A_size(1,1) //Beschriftung > *if k>A_size(1,1)*(printer/10) then* > printer = printer + 1 > xstring(x(k),y3(1),string(k)) > // xstring(x,y,str,[angle,[box]]) > end > set(handles.Anzeige, 'string', 'Diagrammbeschriftung' + string(k) + ' von' + string(A_size(1,1))) > end > > > > The line numbering is connected to the y-axis. How can I move the lattering aboth the plot (or at least the bottom, next to the x-axis)? (attached plot: subplot_with_line_number_2_tenth.gif) > > > > About Jens help: > > I attached three plots: the stacks Picture are with the Code of Jens. Stacking is really nice, but I do not need every line number. With 921 data Points, it is already unreadable again. But thanks for your ideas, the Code is great for learningn anyway. > > > > Cheers > > Frieder > > On 2016-10-12 11:48, Jens Simon Strom wrote: > > Hello Frieder, > Your plots look better now. You can avoid overlapping > of measurement numbers by sawtooth stacking them. See > example code below. > > xdel(); > //Generating dummy measurements x,y > dx=0.5:50; > x=cumsum(dx); > y=sind(x); > nM=length(x);//number of measurements > plot(x,y,'r') > plot(x,y,'b+') > //Plotting the measurement numbers in stacks to avoid overlapping > nstack=6;//number of stacked measurement numbers > hstack=0.2;//height of measurement number stack (relative to window height) > ybase=-0.9; //base ordinate for measurement numbers > yspan=max(y)-min(y); > for m=1:nM//measurement number > xstring(x(m),ybase+(modulo(m,nstack)-1)*hstack*yspan/nstack,string(m)) > end > > Kind regards > Jens > ------------------------------------------------------------------------------------------------------------------------------ > Am 12.10.2016 10:52, schrieb Frieder Nikolaisen: > > Hello, > > thank you for all the feedback and help. It's > really great. > > I used the idea of Jens Simon Strom combined with > some help from last week: > > //Datens?tze > x1 = (A(:,1) - A(1,1)) * 24 * 3600; > y1 = A(:,y_1); > y2 = A(:,y_2); > y3 = A(:,y_3); > drawlater() > > subplot(3, 1, 1) > co = color("green"); > plot2d(x1, y1, co); > a = gca(); > b.font_color = co; > a.foreground = co; > ylabel(string(kT(y_1)),"color",co) > a.x_location = 'top'; > > subplot(3, 1, 2) > co = color("blue"); > plot2d(x1, y2, co); > b = gca(); > b.font_color = co; > b.foreground = co; > ylabel(string(kT(y_2)),"color",co) > b.axes_visible(1) = "off"; > //b.marings = [0.1 0.1 0.3 0.5]; > //b.filled ="off"; > subplot(3, 1, 3) > co=color("red"); > plot2d(x1, y3, co); > c = gca(); > c.font_color = co; > c.foreground = co; > //c.axes_visible(1) ="off"; > ylabel(string(kT(y_3)),"color",co) > //xlabel(string('Zeit [Sekunden]'), co) > x= (A(:,1) - A(1,1)) * 24 * 3600; > for k=1:A_size(1,1) //Beschriftung > xstring(x(k),x(1),string(k)) // x(1) always 0 > // xstring(x,y,str,[angle,[box]]) > disp(x(1)) > end > //c.marings = [0.1 0.1 0.5 0.3]; > //c.filled ="off"; > > drawnow() > > > > > > The printed plots are attached. I did plot different paramters, as I can choose then in my GUI. > > That works well: > > * Three plots, having the same x axis. > * x axis on the top and bottom > * Line *numbers Fitting the x axis*. > > That does not work: > > * showing a *few line numbers* only, > for reading (best case: Fitting the automatic > shown times in sec > > Problem: I cannot tell, how many datapoints there > are going to be. So it mus be choosen automaticly. > > Best regards > > Frieder > > On 2016-10-11 21:04, Samuel Gougeon wrote: > > Hello, > > Le 11/10/2016 14:46, Rafael Guerra a ?crit : > > Hi, > > I was not able to follow the whole discussion > > Neither did i, > > but concerning your subplot challenge: > "/... I cannot add a second x-axis in a > subplot by newaxis(). How to add a x-axis > by using subplot?/"and your last example, > > Couldn't you add a 4^th subplot at the > bottom in order to plot the 2^nd x-axis > (say by plotting only zeros)? > > . > Why not using drawaxis() as already suggested? > drawaxis() is made for this kind of situation. > In this thread, no logarithmic axis is > involved. So i do to catch the reason of > ignoring drawaxis(). > > By the way, IMO, a drawing of what exactly is > required would be clearer than hundred of > lines of description, with schematic curves, > axes, arrows linking curves to their multiple > axes in x and y. > > BR > Samuel Gougeon > > > > _______________________________________________ > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Oct 13 15:34:31 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 13 Oct 2016 13:34:31 +0000 Subject: [Scilab-users] display grid but not the axis Message-ID: Hi Frieder, The code below draws the missing vertical grid when there are no x-axis displayed on the subplot (see picture attached): x1 = (-10:0.5:10)'; y1 = sin(x1); y2= 5*cos(x2); y3= y2/2+y1; clf() subplot(3,1,1) plot2d(x1,y1,color('red'),strf="020"); //no box surrounding plot a=gca(); a.x_location = 'top'; a.axes_visible = ['on','on']; xgrid; subplot(3,1,2) plot2d(x1,y2,color('blue'),strf="020"); ////no box surrounding plot a=gca(); a.axes_visible = ['off','on']; xgrid; x = [a.data_bounds(1,1),a.data_bounds(2,1)]; y = [a.data_bounds(1,2),a.data_bounds(2,2)]; x = (x(2)-x(1))*a.x_ticks.locations + x(1); n= length(x); for i=1:n xpoly([x(i),x(i)],y); e=gce(); e.line_style=3; end subplot(3,1,3) plot2d(x1,y3,strf="020") a=gca(); a.axes_visible = ['on','on']; xgrid; Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Friede r Nikolaisen Sent: Thursday, October 13, 2016 2:05 PM To: mailto:users at lists.scilab.org Subject: [Scilab-users] Fwd: Re: Fwd: plotxxyyy ? Dear community, thank you for you support. I get now wonderful plots. ? There is still a feature missing: Plot two has not x grid. How to add a grid without a axis??(I tried a bit with newaxis... no success) subplot(3, 1, 2) co = color("blue"); plot2d(x1, y2, co); b = gca(); b.font_color = co; b.foreground = co; b.axes_visible(1) = "off"; xgrid(co, 1, 10) ? ? ? This code works well now: subplot(3, 1, 3) co=color("red"); plot2d(x1, y3, co); xgrid(co, 1, 10) c = gca(); c.font_color = co; c.foreground = co; c.data_bounds = [min(x1),min(y3); max(x1),max(y3)+(max(y3)-min(y3))*0.45] //c.axes_visible(1) = "off"; ylabel(string(kT(y_3)),"color",co) xlabel('Sekunden') x= (A(:,1) - A(1,1)) * 24 * 3600; //Input parameters for plotting the measurement numbers with optional gaps and stacking to avoid overlapping nstack=5;//maximum number of stacked measurement numbers hstack=0.3;//height of measurement number stack (relative to window height) ybase=max(y3)*1; //base ordinate for measurement numbers yspan=max(y3)-min(y3); plot(x1(M),y3(M), 'ko') // f?gt schwarze dots hinzu for m=1:length(M) //Beschriftung xstring(x1(M(m)),ybase+(modulo(M(m),nstack))*hstack*yspan/nstack,string(M(m))) set(handles.Anzeige, 'string', 'Diagrammbeschriftung ' + string(k) + ' von ' + string(A_size(1,1))) end ? ? If I have a few hours nothingelse to do, I will try to solve the prolbem with Denis sparse function. With out using a for loop, it will be faster. Best regards Frieder ? PS: I wanted to send two plots, but they are 111kB. I plead for a higher limit. -------------- next part -------------- A non-text attachment was scrubbed... Name: grid_with_no_axis.gif Type: image/gif Size: 14202 bytes Desc: grid_with_no_axis.gif URL: From p.muehlmann at gmail.com Fri Oct 14 00:08:13 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Fri, 14 Oct 2016 00:08:13 +0200 Subject: [Scilab-users] using csvRead Message-ID: Dear Scilab users, having a data file (*.cvs) containg following format: HEADER-Line dd.mm.yyyy, HH:MM:SS.MS, value01, value02 dd = day mm = month yyyy = year HH = hour MM = minute SS = second Ms = milli second ValueXY = numerical value Is it possible to use cvsRead in such a way to define the separator beeing ',' and ':' at the same time? Background: desired Matrix after reading the file is M = [dd mm yyyy HH MM SS MS value1 value2] 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 denis.crete at thalesgroup.com Fri Oct 14 00:51:01 2016 From: denis.crete at thalesgroup.com (CRETE Denis) Date: Fri, 14 Oct 2016 00:51:01 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: Message-ID: <8F1D40232A0E68409E3FC23A30C3266201744CFA6735@THSONEA01CMS04P.one.grp> Hello Philipp, In this case I first attempt to read first (e.g. with ?mopen? and ?getl?) and then split the strings with ?tokens? where the feature of multiple separators exists. Of course you can also use ?cvsRead? with one separator and then use ?tokens? to finish with the other separators. HTH Denis [@@ THALES GROUP INTERNAL @@] Unit? Mixte de Physique CNRS / THALES 1 Avenue Augustin Fresnel 91767 Palaiseau CEDEx - France Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 e-mail : denis.crete at thalesgroup.com http://www.trt.thalesgroup.com/ump-cnrs-thales http://www.research.thalesgroup.com De : users [mailto:users-bounces at lists.scilab.org] De la part de Philipp M?hlmann Envoy? : vendredi 14 octobre 2016 00:08 ? : International users mailing list for Scilab. Objet : [Scilab-users] using csvRead Dear Scilab users, having a data file (*.cvs) containg following format: HEADER-Line dd.mm.yyyy, HH:MM:SS.MS, value01, value02 dd = day mm = month yyyy = year HH = hour MM = minute SS = second Ms = milli second ValueXY = numerical value Is it possible to use cvsRead in such a way to define the separator beeing ',' and ':' at the same time? Background: desired Matrix after reading the file is M = [dd mm yyyy HH MM SS MS value1 value2] 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 p.muehlmann at gmail.com Fri Oct 14 11:50:06 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Fri, 14 Oct 2016 11:50:06 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: <8F1D40232A0E68409E3FC23A30C3266201744CFA6735@THSONEA01CMS04P.one.grp> References: <8F1D40232A0E68409E3FC23A30C3266201744CFA6735@THSONEA01CMS04P.one.grp> Message-ID: Dear Denis, yes thats the way I do it right now. use mopen --> open file for reading use mgetl --> read data, result = array of strings use strsplit --> split string Array as desired use evestring() --> convert string to double Point of disadvantage So fa I know strsplit() can handle only one string. Hence I use a for-loop to split each line of the Initial string array into a group of strings and convert each part into a double. OK for few data...may take long for many data Idea: Read data from file and try to spare conversation string-to-double. fscanfMat() won't do it, because the data does not contain only numerical values and "."-sign as decimal. So I tried csvRead. using the help I find: separator : a 1-by-1 matrix of strings, the field separator used. Note: STRINGS = plural. So I wonder if it is possible to have more than one separator here. BR Philipp mclose( :-) ) 2016-10-14 0:51 GMT+02:00 CRETE Denis : > Hello Philipp, > > > > In this case I first attempt to read first (e.g. with ?mopen? and ?getl?) > and then split the strings with ?tokens? where the feature of multiple > separators exists. > > Of course you can also use ?cvsRead? with one separator and then use > ?tokens? to finish with the other separators. > > HTH > > Denis > > > > [@@ THALES GROUP INTERNAL @@] > > > > Unit? Mixte de Physique CNRS / THALES > > 1 Avenue Augustin Fresnel > > 91767 Palaiseau CEDEx - France > > Tel : +33 (0)1 69 41 58 52 Fax : +33 (0)1 69 41 58 78 > > e-mail : > > denis.crete at thalesgroup.com <%20denis.crete at thalesgroup.com>> > > http://www.trt.thalesgroup.com/ump-cnrs-thales > > http://www.research.thalesgroup.com > > > > *De :* users [mailto:users-bounces at lists.scilab.org] *De la part de* > Philipp M?hlmann > *Envoy? :* vendredi 14 octobre 2016 00:08 > *? :* International users mailing list for Scilab. > *Objet :* [Scilab-users] using csvRead > > > > Dear Scilab users, > > having a data file (*.cvs) containg following format: > > HEADER-Line > > dd.mm.yyyy, HH:MM:SS.MS, value01, value02 > > dd = day > > mm = month > > yyyy = year > > HH = hour > > MM = minute > > SS = second > > Ms = milli second > > ValueXY = numerical value > > > > Is it possible to use cvsRead in such a way to define the separator beeing > ',' and ':' at the same time? > > Background: > > desired Matrix after reading the file is > > M = [dd mm yyyy HH MM SS MS value1 value2] > > > > Thank you, > > Philipp > > > > -- > > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > > > There we have the salad. > > _______________________________________________ > 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 jrafaelbguerra at hotmail.com Fri Oct 14 12:52:56 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 14 Oct 2016 10:52:56 +0000 Subject: [Scilab-users] using csvRead In-Reply-To: References: <8F1D40232A0E68409E3FC23A30C3266201744CFA6735@THSONEA01CMS04P.one.grp> Message-ID: Hello Philipp, Say that after mopen you got all your text input into array of strings ?txt?: txt = [ "HEADER-Line", "01.12.2015, 01:15:00.12, 1.1, -2.2"; "03.12.2015, 11:15:00.12, -11.1, 2.5"; "12.12.2015, 21:15:00.12, 5.1, 6.2"]; Then do the following: tx=txt(2:$); // get rid of header line tx1=part(tx,1:24); // get date and time tx2=part(tx,25:$); // get numeric data values // Now get rid of separators: tx1 = strsubst(tx1,'.',' '); tx1 = strsubst(tx1,':',' '); tx1 = strsubst(tx1,',',' '); tx2 = strsubst(tx2,',',' '); tx = [tx1 tx2]; // regroups all data but now with numeric values only Use mputl to output ?tx? to temporary disk file and use fscanfMat to read like a breeze the large disk file (now fully numeric) into a Scilab numeric matrix ?M?. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Philipp M?hlmann Sent: Friday, October 14, 2016 11:50 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Dear Denis, yes thats the way I do it right now. use mopen --> open file for reading use mgetl --> read data, result = array of strings use strsplit --> split string Array as desired use evestring() --> convert string to double Point of disadvantage So fa I know strsplit() can handle only one string. Hence I use a for-loop to split each line of the Initial string array into a group of strings and convert each part into a double. OK for few data...may take long for many data Idea: Read data from file and try to spare conversation string-to-double. fscanfMat() won't do it, because the data does not contain only numerical values and "."-sign as decimal. So I tried csvRead. using the help I find: separator : a 1-by-1 matrix of strings, the field separator used. Note: STRINGS = plural. So I wonder if it is possible to have more than one separator here. BR Philipp mclose( :-) ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Fri Oct 14 12:57:58 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 14 Oct 2016 10:57:58 +0000 Subject: [Scilab-users] using csvRead In-Reply-To: References: <8F1D40232A0E68409E3FC23A30C3266201744CFA6735@THSONEA01CMS04P.one.grp> Message-ID: Correction: after having obtained ?tx? as below, just do: M=evstr(tx); From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Rafael Guerra Sent: Friday, October 14, 2016 12:53 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Hello Philipp, Say that after mopen you got all your text input into array of strings ?txt?: txt = [ "HEADER-Line", "01.12.2015, 01:15:00.12, 1.1, -2.2"; "03.12.2015, 11:15:00.12, -11.1, 2.5"; "12.12.2015, 21:15:00.12, 5.1, 6.2"]; Then do the following: tx=txt(2:$); // get rid of header line tx1=part(tx,1:24); // get date and time tx2=part(tx,25:$); // get numeric data values // Now get rid of separators: tx1 = strsubst(tx1,'.',' '); tx1 = strsubst(tx1,':',' '); tx1 = strsubst(tx1,',',' '); tx2 = strsubst(tx2,',',' '); tx = [tx1 tx2]; // regroups all data but now with numeric values only Use mputl to output ?tx? to temporary disk file and use fscanfMat to read like a breeze the large disk file (now fully numeric) into a Scilab numeric matrix ?M?. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Philipp M?hlmann Sent: Friday, October 14, 2016 11:50 AM To: Users mailing list for Scilab > Subject: Re: [Scilab-users] using csvRead Dear Denis, yes thats the way I do it right now. use mopen --> open file for reading use mgetl --> read data, result = array of strings use strsplit --> split string Array as desired use evestring() --> convert string to double Point of disadvantage So fa I know strsplit() can handle only one string. Hence I use a for-loop to split each line of the Initial string array into a group of strings and convert each part into a double. OK for few data...may take long for many data Idea: Read data from file and try to spare conversation string-to-double. fscanfMat() won't do it, because the data does not contain only numerical values and "."-sign as decimal. So I tried csvRead. using the help I find: separator : a 1-by-1 matrix of strings, the field separator used. Note: STRINGS = plural. So I wonder if it is possible to have more than one separator here. BR Philipp mclose( :-) ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Fri Oct 14 13:28:28 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 14 Oct 2016 11:28:28 +0000 Subject: [Scilab-users] using csvRead In-Reply-To: References: <8F1D40232A0E68409E3FC23A30C3266201744CFA6735@THSONEA01CMS04P.one.grp> Message-ID: NOTE: fyi, after testing over very large text files, it happens that doing mputl of ?tx? to disk followed by M=fscanfMat is much faster than doing simply M=evstr(tx) ? From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Rafael Guerra Sent: Friday, October 14, 2016 12:58 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Correction: after having obtained ?tx? as below, just do: M=evstr(tx); From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Rafael Guerra Sent: Friday, October 14, 2016 12:53 PM To: Users mailing list for Scilab > Subject: Re: [Scilab-users] using csvRead Hello Philipp, Say that after mopen you got all your text input into array of strings ?txt?: txt = [ "HEADER-Line", "01.12.2015, 01:15:00.12, 1.1, -2.2"; "03.12.2015, 11:15:00.12, -11.1, 2.5"; "12.12.2015, 21:15:00.12, 5.1, 6.2"]; Then do the following: tx=txt(2:$); // get rid of header line tx1=part(tx,1:24); // get date and time tx2=part(tx,25:$); // get numeric data values // Now get rid of separators: tx1 = strsubst(tx1,'.',' '); tx1 = strsubst(tx1,':',' '); tx1 = strsubst(tx1,',',' '); tx2 = strsubst(tx2,',',' '); tx = [tx1 tx2]; // regroups all data but now with numeric values only Use mputl to output ?tx? to temporary disk file and use fscanfMat to read like a breeze the large disk file (now fully numeric) into a Scilab numeric matrix ?M?. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Philipp M?hlmann Sent: Friday, October 14, 2016 11:50 AM To: Users mailing list for Scilab > Subject: Re: [Scilab-users] using csvRead Dear Denis, yes thats the way I do it right now. use mopen --> open file for reading use mgetl --> read data, result = array of strings use strsplit --> split string Array as desired use evestring() --> convert string to double Point of disadvantage So fa I know strsplit() can handle only one string. Hence I use a for-loop to split each line of the Initial string array into a group of strings and convert each part into a double. OK for few data...may take long for many data Idea: Read data from file and try to spare conversation string-to-double. fscanfMat() won't do it, because the data does not contain only numerical values and "."-sign as decimal. So I tried csvRead. using the help I find: separator : a 1-by-1 matrix of strings, the field separator used. Note: STRINGS = plural. So I wonder if it is possible to have more than one separator here. BR Philipp mclose( :-) ) -------------- next part -------------- An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Fri Oct 14 14:03:58 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Fri, 14 Oct 2016 14:03:58 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: <8F1D40232A0E68409E3FC23A30C3266201744CFA6735@THSONEA01CMS04P.one.grp> Message-ID: Dear Rafael, thank you for the example. One comment: before mputl(tx,fd) I had to use: tx = [tx1+tx2] --> 3 x 1 matrix instead of tx = [tx1 tx2] --> 3 x 2 matrix, does not work with mputl However, thanks for the solution. Philipp 2016-10-14 13:28 GMT+02:00 Rafael Guerra : > NOTE: fyi, after testing over very large text files, it happens that > doing *mputl* of ?tx? to disk followed by *M=fscanfMat *is much faster > than doing simply* M=evstr(tx) *? > > > > > > *From:* users [mailto:users-bounces at lists.scilab.org] *On Behalf Of *Rafael > Guerra > *Sent:* Friday, October 14, 2016 12:58 PM > > *To:* Users mailing list for Scilab > *Subject:* Re: [Scilab-users] using csvRead > > > > *Correction:* after having obtained ?tx? as below, just do: M=evstr(tx > ); > > > > *From:* users [mailto:users-bounces at lists.scilab.org > ] *On Behalf Of *Rafael Guerra > *Sent:* Friday, October 14, 2016 12:53 PM > *To:* Users mailing list for Scilab > *Subject:* Re: [Scilab-users] using csvRead > > > > Hello Philipp, > > > > Say that after *mopen* you got all your text input into array of strings > ?txt?: > > > > txt = [ > > "HEADER-Line", > > "01.12.2015, 01:15:00.12, 1.1, -2.2"; > > "03.12.2015, 11:15:00.12, -11.1, 2.5"; > > "12.12.2015, 21:15:00.12, 5.1, 6.2"]; > > > > Then do the following: > > > > tx=txt(2:$); // get rid of header line > > tx1=part(tx,1:24); // get date and time > > tx2=part(tx,25:$); // get numeric data values > > // Now get rid of separators: > > tx1 = strsubst(tx1,'.',' '); > > tx1 = strsubst(tx1,':',' '); > > tx1 = strsubst(tx1,',',' '); > > tx2 = strsubst(tx2,',',' '); > > tx = [tx1 tx2]; // regroups all data but now with numeric values only > > > > Use *mputl* to output ?tx? to temporary disk file and use *fscanfMat* to > read like a breeze the large disk file (now fully numeric) into a Scilab > numeric matrix ?M?. > > > > Regards, > > Rafael > > > > *From:* users [mailto:users-bounces at lists.scilab.org > ] *On Behalf Of *Philipp M?hlmann > *Sent:* Friday, October 14, 2016 11:50 AM > *To:* Users mailing list for Scilab > *Subject:* Re: [Scilab-users] using csvRead > > > > Dear Denis, > > > > yes thats the way I do it right now. > > > > use mopen --> open file for reading > > use mgetl --> read data, result = array of strings > > use strsplit --> split string Array as desired > > > > use evestring() --> convert string to double > > > > Point of disadvantage > > > > So fa I know strsplit() can handle only one string. > > Hence I use a for-loop to split each line of the Initial string array into > a group of strings and convert each part into a double. > > > > OK for few data...may take long for many data > > > > Idea: > > Read data from file and try to spare conversation string-to-double. > > fscanfMat() won't do it, because the data does not contain only numerical > values and "."-sign as decimal. > > So I tried csvRead. > > using the help I find: separator : a 1-by-1 matrix of strings, the > field separator used. > > > > Note: STRINGS = plural. > > > > So I wonder if it is possible to have more than one separator here. > > > > BR > > Philipp > > > > mclose( :-) ) > > > > > > _______________________________________________ > 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 arctica1963 at gmail.com Fri Oct 14 18:06:12 2016 From: arctica1963 at gmail.com (Lester Anderson) Date: Fri, 14 Oct 2016 17:06:12 +0100 Subject: [Scilab-users] Input/output of tabulated data Message-ID: Hello, Quick query. If I have a data file containg three columns e.g. Long Lat gravity 12 2 34.4 20 4 60.3 30 6 23.7 I want to read column 3 (gravity) to process and then write the results back out as: gravity_processed = f(gravity) Long Lat gravity_processed 12 2 g1 20 4 g2 30 6 g3 etc. Is there a simple way of doing this? Thanks Lester From Serge.Steer at inria.fr Fri Oct 14 20:52:27 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Fri, 14 Oct 2016 20:52:27 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: Message-ID: <5295a13c-3d7c-19d4-64b3-17de3c40445d@inria.fr> you can use the mfscanf function: u=mopen("myfile","r"); h=mfscanf(1,u,"%s\n"); r=mfscanf(-1,u,"%d.%d.%d, %d:%d:%f, %f, %f\n"); mclose(u) Serge Steer Le 14/10/2016 ? 00:08, Philipp M?hlmann a ?crit : > Dear Scilab users, > > having a data file (*.cvs) containg following format: > > > HEADER-Line > dd.mm.yyyy, HH:MM:SS.MS , value01, value02 > > dd = day > mm = month > yyyy = year > > HH = hour > MM = minute > SS = second > Ms = milli second > > ValueXY = numerical value > > Is it possible to use cvsRead in such a way to define the separator > beeing ',' and ':' at the same time? > > Background: > > desired Matrix after reading the file is > > M = [dd mm yyyy HH MM SS MS value1 value2] > > > Thank you, > Philipp > > > -- > In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. > > There we have the salad. > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From contact at pierre-vuillemin.fr Sat Oct 15 10:30:53 2016 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Sat, 15 Oct 2016 10:30:53 +0200 Subject: [Scilab-users] Creation of a library with macros located in various folders In-Reply-To: References: Message-ID: Well, after some trials and (mainly) errors, it seems that when saving a function which name is given by the variable function_name, save(function_name + ".bin", function_name) does not work, while execstr("save("""function_name + ".bin""," +function_name+")") does work. The attached file contains a routine that goes recursively through folders in a given path to find the .sci files and create a library in a given build folder. It works as follows, rgenlib(lib_name, src_path, target_path) It seems to be 'working' but produces warnings due to: - the way binary files are saved (see above), which will change in Scilab 6 if I am correct, - the functions in the library being already loaded in Scilab for some reason. If anyone has an insight concerning the second point, I am interested. Best regards, Pierre Le 12/10/2016 ? 22:00, Pierre Vuillemin a ?crit : > > Hi all, > > I am trying to make a function similar to genlib but which goes > recursively through folders to find .sci files, compile them and put > them in a given target build folder. > > The idea is that I would like to be able to organize my 'macros' > folder while still being able to generate a library. In particular, I > would like to have that kind of folder organization : > > - build > > > - src > - sub-folder1 > <.sci files> > ... > - sub-folder n > - sub sub folder 1 > <.sci files> > < .sci files> > > > At the moment, the function (build.sce in the attached file) goes > through the folders contained in the initial 'src' folder, performs an > 'exec' on the .sci files that are found, and save the corresponding > binary files in the target folder 'build' (at the same level as > 'src'). It also generates a 'names' file containing the names of the > functions in the 'build' folder. > > Finally, it creates a library with the binary files contained in the > 'build' folder. > > > Yet, when I try to use my functions, I get the following error: > > !--error 999 > Overloaded load cannot occur in this context > > So I guess that there is something wrong with the way I generate my > library? > > My binary files are generated as follows, > > function_name = strsubst(fi,".sci","") // fi is the full > name of the file > names_to_write = [names_to_write;function_name] // used later > to generate the file containing the names > exec(file_path, -1) // file_path is the absolute path to my > function > save(target_path + function_name + ".bin", function_name) > > and the names file is generated as, > > names_file = target_path + "names" > [fd, err] = mopen(names_file,"a") > mputl(names_to_write, fd) > mclose(fd) > > > Best regards, > > Pierre Vuillemin > > > > _______________________________________________ > 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: rgenlib.sci Type: application/x-scilab-sci Size: 1255 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Sat Oct 15 15:22:05 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 15 Oct 2016 13:22:05 +0000 Subject: [Scilab-users] using csvRead In-Reply-To: <5295a13c-3d7c-19d4-64b3-17de3c40445d@inria.fr> References: <5295a13c-3d7c-19d4-64b3-17de3c40445d@inria.fr> Message-ID: Thanks for the perfect neat solution in C-style. A nice example of Columbus' egg and also of why bother making it simple when we made it difficult. Kind regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Serge Steer Sent: Friday, October 14, 2016 8:52 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead you can use the mfscanf function: u=mopen("myfile","r"); h=mfscanf(1,u,"%s\n"); r=mfscanf(-1,u,"%d.%d.%d, %d:%d:%f, %f, %f\n"); mclose(u) Serge Steer Le 14/10/2016 ? 00:08, Philipp M?hlmann a ?crit : Dear Scilab users, having a data file (*.cvs) containg following format: HEADER-Line dd.mm.yyyy, HH:MM:SS.MS, value01, value02 dd = day mm = month yyyy = year HH = hour MM = minute SS = second Ms = milli second ValueXY = numerical value Is it possible to use cvsRead in such a way to define the separator beeing ',' and ':' at the same time? Background: desired Matrix after reading the file is M = [dd mm yyyy HH MM SS MS value1 value2] 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 sgougeon at free.fr Sat Oct 15 15:45:11 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 15:45:11 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: Message-ID: <580232E7.4090505@free.fr> Hello Le 14/10/2016 00:08, Philipp M?hlmann a ?crit : > Dear Scilab users, > > having a data file (*.cvs) containg following format: > > > HEADER-Line > dd.mm.yyyy, HH:MM:SS.MS , value01, value02 > > dd = day > mm = month > yyyy = year > > HH = hour > MM = minute > SS = second > Ms = milli second > > ValueXY = numerical value > > Is it possible to use cvsRead in such a way to define the separator > beeing ',' and ':' at the same time? Beside the solution provided by Serge, if you wish to stick to csvRead(), have you tried using its "substitute" option, with a [":" ","] value? I didn't, but would be interested by results. I am wondering whether the substitution is done before splitting the line with the separator (then "substitute" will work), or after. This detail would deserve being documented. Read you soon Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Oct 15 17:31:47 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 17:31:47 +0200 Subject: [Scilab-users] Creation of a library with macros located in various folders In-Reply-To: References: Message-ID: <58024BE3.4040002@free.fr> Hello Pierre, Scilab 6.0 will propose a new function *tbx_make*(..) that will be able to do exactly what you want: https://codereview.scilab.org/#/c/18071/ By the way, it will greatly simplify compilation of modules, and will no longer require many cooky-files .sce like buildmacros.sce buildoc.sce etc etc spread everywhere in the tree of files of a module. On the forefront, tbx_make() aims to replace & merge most of functions of the "modules manager" module, that are rather some atomic internals not really welcome as public functions: https://help.scilab.org/docs/6.0.0/en_US/section_d8452c14ec97df3c90ea90bb4f7d53b6.html If you use Scilab on Linux, you can already test tbx_make() in the nightly built release (*). If you are working with Scilab 5, you may use the attached script. Its how-to is in comments. Regards Samuel (*) tbx_make() merged on 2016-10-02 in the master release is still unavailable in the today NB sticking on the 2016-09-22 sources for Windows. Le 12/10/2016 22:00, Pierre Vuillemin a ?crit : > > Hi all, > > I am trying to make a function similar to genlib but which goes > recursively through folders to find .sci files, compile them and put > them in a given target build folder. > > The idea is that I would like to be able to organize my 'macros' > folder while still being able to generate a library. In particular, I > would like to have that kind of folder organization : > > .../... -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- // "genlib" a folder of macros with subfolders of macros // The name of the folder yields the name of the main library (+"lib") // The name of each subfolder yields the name of the related sublibrary (+"lib") // // Put this script in the main macros folder and exec() it from anywhere. path = get_absolute_file_path("buildmacros.sce") tmp = strsplit(fileparts(path),filesep()); dirs = dir(path); dirs = dirs.name(dirs.isdir)' genlib(tmp($-1)+"lib", path, %t); for d = dirs genlib(d+"lib",path+d, %t); end From sgougeon at free.fr Sat Oct 15 17:46:03 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 17:46:03 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: Message-ID: <58024F3B.6020306@free.fr> Le 14/10/2016 00:08, Philipp M?hlmann a ?crit : > Dear Scilab users, > > having a data file (*.cvs) containg following format: > > HEADER-Line > dd.mm.yyyy, HH:MM:SS.MS , value01, value02 > > .../... > Is it possible to use cvsRead in such a way to define the separator > beeing ',' and ':' at the same time? > > desired Matrix after reading the file is > > M = [dd mm yyyy HH MM SS MS value1 value2] . This requires also that "." to be considered as a separator to split dd.mm.yyyy, in addition to "," and ":". Then, the SS.MS will yield 2 separate fields. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Oct 15 17:55:05 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 17:55:05 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: <580232E7.4090505@free.fr> References: <580232E7.4090505@free.fr> Message-ID: <58025159.3090302@free.fr> Le 15/10/2016 15:45, Samuel Gougeon a ?crit : > Hello > > Le 14/10/2016 00:08, Philipp M?hlmann a ?crit : >> Dear Scilab users, >> >> having a data file (*.cvs) containg following format: >> >> >> HEADER-Line >> dd.mm.yyyy, HH:MM:SS.MS , value01, value02 >> >> dd = day >> mm = month >> yyyy = year >> >> HH = hour >> MM = minute >> SS = second >> Ms = milli second >> >> ValueXY = numerical value >> >> Is it possible to use cvsRead in such a way to define the separator >> beeing ',' and ':' at the same time? > Beside the solution provided by Serge, if you wish to stick to > csvRead(), have you tried using its "substitute" option, with a [":" > ","] value? > I didn't, but would be interested by results. . It works: the substitution is done *before* the splitting. Example: The file.csv content: -------- Header line 12.08.2016, 13:54:18.45, 3.145, 548.4 -------- -->csvRead("file.csv",",",[],"string",[":", ","],[],[],1) ans = !12.08.2016 13 54 18.45 3.145 548.4 ! Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Oct 15 18:22:23 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 18:22:23 +0200 Subject: [Scilab-users] Fwd: Re: Fwd: plotxxyyy In-Reply-To: <84df568b42b0935da65e562194da8434@mail.student.hs-rm.de> References: <84df568b42b0935da65e562194da8434@mail.student.hs-rm.de> Message-ID: <580257BF.8080804@free.fr> Le 13/10/2016 14:05, Frieder Nikolaisen a ?crit : > > Dear community, > > thank you for you support. I get now wonderful plots. > > There is still a feature missing: Plot two has not x grid. *How to add > a grid without a axis?* (I tried a bit with newaxis... no success) > Aaaarr.. I have forgotten this bug, reported at http://bugzilla.scilab.org/13564 An additional evidence that the grid visibility must become independent from the axis visibility. BR Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Oct 15 18:58:11 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 15 Oct 2016 16:58:11 +0000 Subject: [Scilab-users] using csvRead In-Reply-To: <5295a13c-3d7c-19d4-64b3-17de3c40445d@inria.fr> References: <5295a13c-3d7c-19d4-64b3-17de3c40445d@inria.fr> Message-ID: Hi Serge, One question: For some strange reason, the variable 'r' is in this case a mlist of type cblock and not a matrix of type constant. To convert it to constant, it seems that we need a further instruction, such as: r=r( : , : ); Any comments on this? Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Serge Steer Sent: Friday, October 14, 2016 8:52 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead you can use the mfscanf function: u=mopen("myfile","r"); h=mfscanf(1,u,"%s\n"); r=mfscanf(-1,u,"%d.%d.%d, %d:%d:%f, %f, %f\n"); mclose(u) Serge Steer Le 14/10/2016 ? 00:08, Philipp M?hlmann a ?crit : Dear Scilab users, having a data file (*.cvs) containg following format: HEADER-Line dd.mm.yyyy, HH:MM:SS.MS, value01, value02 dd = day mm = month yyyy = year HH = hour MM = minute SS = second Ms = milli second ValueXY = numerical value Is it possible to use cvsRead in such a way to define the separator beeing ',' and ':' at the same time? Background: desired Matrix after reading the file is M = [dd mm yyyy HH MM SS MS value1 value2] Thank you, Philipp -- In Kanada is' ka' na' da. Sonst w?r' Kanada Jemanda. There we have the salad. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Oct 15 19:16:09 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 15 Oct 2016 17:16:09 +0000 Subject: [Scilab-users] using csvRead In-Reply-To: <58025159.3090302@free.fr> References: <580232E7.4090505@free.fr> <58025159.3090302@free.fr> Message-ID: Hi Samuel, As the data is loaded by csvRead as strings in the example below (if loading as doubles then we get NaN's), it will require further processing to convert it to numeric (using evstr, tokens or other). For very large data files, this seems to be rather slow compared to the mfscanf or fscanfMat solutions. What do you think? Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Saturday, October 15, 2016 5:55 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Le 15/10/2016 15:45, Samuel Gougeon a ?crit : Hello Le 14/10/2016 00:08, Philipp M?hlmann a ?crit : Dear Scilab users, having a data file (*.cvs) containg following format: HEADER-Line dd.mm.yyyy, HH:MM:SS.MS, value01, value02 dd = day mm = month yyyy = year HH = hour MM = minute SS = second Ms = milli second ValueXY = numerical value Is it possible to use cvsRead in such a way to define the separator beeing ',' and ':' at the same time? Beside the solution provided by Serge, if you wish to stick to csvRead(), have you tried using its "substitute" option, with a [":" ","] value? I didn't, but would be interested by results. . It works: the substitution is done before the splitting. Example: The file.csv content: -------- Header line 12.08.2016, 13:54:18.45, 3.145, 548.4 -------- -->csvRead("file.csv",",",[],"string",[":", ","],[],[],1) ans = !12.08.2016 13 54 18.45 3.145 548.4 ! Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Oct 15 19:26:02 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 19:26:02 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: <5295a13c-3d7c-19d4-64b3-17de3c40445d@inria.fr> Message-ID: <580266AA.8040303@free.fr> Le 15/10/2016 18:58, Rafael Guerra a ?crit : > > Hi Serge, > > One question: > > For some strange reason, the variable ?r? is in this case a mlist of > type cblock and not a matrix of type constant. > > To convert it to constant, it seems that we need a further > instruction, such as:r=r( : , : ); > > Any comments on this? > This is fully documented: https://help.scilab.org/docs/6.0.0/en_US/mfscanf.html It is possible to specify several output variables to collect field columns one by one. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Oct 15 19:32:15 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 15 Oct 2016 17:32:15 +0000 Subject: [Scilab-users] using csvRead In-Reply-To: <580266AA.8040303@free.fr> References: <5295a13c-3d7c-19d4-64b3-17de3c40445d@inria.fr> <580266AA.8040303@free.fr> Message-ID: Thanks Samuel, but I could not see where does it say how can we convert a mlist of ctype to a regular matrix, so that we can use all usual matrix operations. Could you please advise. PS: in the example under discussion, doing: r=r( :,: ); seems to do the trick. From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Saturday, October 15, 2016 7:26 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Le 15/10/2016 18:58, Rafael Guerra a ?crit : Hi Serge, One question: For some strange reason, the variable 'r' is in this case a mlist of type cblock and not a matrix of type constant. To convert it to constant, it seems that we need a further instruction, such as: r=r( : , : ); Any comments on this? This is fully documented: https://help.scilab.org/docs/6.0.0/en_US/mfscanf.html It is possible to specify several output variables to collect field columns one by one. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Oct 15 19:35:38 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 19:35:38 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: <580232E7.4090505@free.fr> <58025159.3090302@free.fr> Message-ID: <580268EA.7050703@free.fr> Le 15/10/2016 19:16, Rafael Guerra a ?crit : > > Hi Samuel, > > As the data is loaded by csvRead as strings in the example below (if > loading as doubles then we get NaN?s), it will require further > processing to convert it to numeric (using evstr, tokens or other). > > For very large data files, this seems to be rather slow compared to > the mfscanf or fscanfMatsolutions. > > What do you think? > . AFAIK, fscanfMat() is very stiff. It can parse files only for numbers, with no interstitial contents. I know no benchmark comparing csvRead() + evstr() vs mfscanf(). Despite evstr() is vectorized, you may be right. Explicit results would be interesting. mfscanf() requires the structure of a row been explicitly known. But then it looks certainly the most versatile and adaptable solution to read and split it. csvRead() requires just to know the separator. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Oct 15 20:11:46 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 20:11:46 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: <5295a13c-3d7c-19d4-64b3-17de3c40445d@inria.fr> <580266AA.8040303@free.fr> Message-ID: <58027162.80806@free.fr> Le 15/10/2016 19:32, Rafael Guerra a ?crit : > > Thanks Samuel, but I could not see where does it say how can we > convert a mlist of ctype to a regular matrix, so that we can use all > usual matrix operations. Could you please advise. > You are right, the *cblock* type is nowhere documented. Simple tests show that it is similar to -- but more handy than -- a row of cells: -->b = msscanf(-1,['012345 abc zoo';"457.1 tfr 845"],'%f %s %s') b = 12345 abc zoo 457.10001 tfr 845 -->b(:,1), typeof(b(:,1)) ans = 12345. 457.10001 ans = constant -->b(:,2), typeof(b(:,2)) ans = !abc ! ! ! !tfr ! ans = string -->b(1,:) ans = 12345 abc zoo // Yeh! Searching for "cblock" in the help shows that, apart for Xcos, this mtype is used only by m*scanf(). Its addressing indices are exactly what we could expect for addressing cells contents, with no specific useless and awkward {} insertors or extractors. [ BTW, {} yield an error at Scilab 5 compilation time. So the same macro code can't be compiled with Scilab 5 and Scilab 6 as soon as {} indexation is used]. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sat Oct 15 20:49:27 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sat, 15 Oct 2016 18:49:27 +0000 Subject: [Scilab-users] using csvRead vs mfscanf and fscanfMat Message-ID: Hi Samuel, Please check test code here below, comparing csvRead vs mfscanf and fscanfMat for the asci format used by Philipp and a file with 50,000 lines of data. On my laptop it takes about 35 s to run mainly because of evstr function, which is avoided in the mfscanf and fscanfMat methods as shown. // Simple test of mfscanf, fscanfMat and csvRead methods //START OF CODE clear; txt = [ "HEADER-Line", "01.12.2015, 01:15:00.12, 1.1, -2.2"]; u = mopen("myfile.txt","w"); mfprintf(u,"%s\n",txt(1)); mfprintf(u,"%s\n",repmat(txt(2),50000,1)); //output file with 50,000 lines mclose(u) timer(); // SOLUTION#1: mfscanf u = mopen("myfile.txt","r"); h = mfscanf(1,u,"%s\n"); r = mfscanf(-1,u,"%d.%d.%d, %d:%d:%d.%d, %f, %f\n"); mclose(u) r = r(:,:); //to convert from mlist of ctype to matrix of constant type t1 = timer(); // SOLUTION#2: fscanfMat u = mopen("myfile.txt","r"); tx = mgetl(u,-1) mclose(u); tx = tx(2:$); // get rid of header line tx1 = part(tx,1:24); // get date and time tx2 = part(tx,25:$); // get numeric data values // Now get rid of separators: tx1 = strsubst(tx1,'.',' '); tx1 = strsubst(tx1,':',' '); tx1 = strsubst(tx1,',',' '); tx2 = strsubst(tx2,',',' '); tx = tx1 + tx2; // regroups all data but now with numeric values only fd = mopen("temp.bak","w"); mputl(tx,fd); mclose(fd); m = fscanfMat('temp.bak') mdelete('temp.bak'); t2 = timer(); // SOLUTION#3: csvRead q = csvRead("myfile.txt",",",[],"string",[":", ","],[],[],1); tx1 = q(:,1); tx2 = q(:,2:$); q2 = evstr(tx2); // Most time consuming step // (plus, work will still be required to handle dates in txt1) t3 = timer(); disp( [tx1(1,:) string(q2(1,:))], r(1,:), m(1,:) ) printf("\ntime1= %g\ntime2= %g\ntime3= %g",t1,t2,t3) //END OF CODE The results for a 50,000-lines input ASCII file are: time1= 0.686404 time2= 0.499203 time3= 35.3966 Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Saturday, October 15, 2016 7:36 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead Le 15/10/2016 19:16, Rafael Guerra a ?crit?: Hi Samuel, ? As the data is loaded by csvRead as strings in the example below (if loading as doubles then we get NaN's), it will require further processing to convert it to numeric (using evstr, tokens or other). For very large data files, this seems to be rather slow compared to the mfscanf or fscanfMat solutions. ? What do you think? . AFAIK, fscanfMat() is very stiff. It can parse files only for numbers, with no interstitial contents. I know no benchmark comparing csvRead() + evstr() vs mfscanf(). Despite evstr() is vectorized, you may be right. Explicit results would be interesting. mfscanf() requires the structure of a row been explicitly known. But then it looks certainly the most versatile and adaptable solution to read and split it. csvRead() requires just to know the separator. Samuel From sgougeon at free.fr Sat Oct 15 21:16:05 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 21:16:05 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: References: Message-ID: <58028075.6000702@free.fr> Hello Philipp, Le 14/10/2016 00:08, Philipp M?hlmann a ?crit : > Dear Scilab users, > > having a data file (*.cvs) containg following format: > > > HEADER-Line > dd.mm.yyyy, HH:MM:SS.MS , value01, value02 > > dd = day > mm = month > yyyy = year > > HH = hour > MM = minute > SS = second > Ms = milli second > > ValueXY = numerical value > > Is it possible to use cvsRead in such a way to define the separator > beeing ',' and ':' at the same time? . Yes and no: Yes because each character of the "separator" option is (sometimes) considered as a separator. And no, because it sometimes fails. I was designing an example to add to the csvRead() page, when a found this bug: --> mputl("12.08.2016, 13:54:18.45, 3.145, 548.4", TMPDIR+"/test.csv") --> r = "''"+csvRead("test.csv","8.",[],"string")+"''" r = !'12' '0' '2016, 13:54:1' '45, 3' '145, 54' '4' ! --> // it works: both "8" and "." are *separately* considered as separators --> // now trying with "," and ":": --> r = "''"+csvRead("test.csv",",:", [], "string")+"''" --> r = "''"+csvRead("test.csv",",:", [], "string")+"''" r = '12.08.2016, 13:54:18.45, 3.145, 548.4' --> // The row is kept as is: no splitting! --> // We could expect: ['12.08.2016' ' 13' '54' '18.45' ' 3.145' ' 548.4'] --> // (with leading spaces, since they are not set as separators) --> There are already 10 pending reported bugs about csvRead(). One more. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sat Oct 15 22:59:36 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 22:59:36 +0200 Subject: [Scilab-users] using csvRead vs mfscanf and fscanfMat In-Reply-To: References: Message-ID: <580298B8.9090403@free.fr> Hello Rafael, Le 15/10/2016 20:49, Rafael Guerra a ?crit : > .../... > > The results for a 50,000-lines input ASCII file are: > time1= 0.686404 // mfscanf > time2= 0.499203 // fscanfMat > time3= 35.3966 // csvRead . Thanks for these very convincing results. I thought that evstr() is vectorized because it is so on my PC, after having worked on it. But a trivial improvement was still unsubmitted. Repaired: https://codereview.scilab.org/#/c/18586/ Despite this improvement fasten evstr() by a factor > 10, this is not enough to reach mfscanf()'s speed. BR Samuel From sgougeon at free.fr Sat Oct 15 23:40:37 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 15 Oct 2016 23:40:37 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: <58028075.6000702@free.fr> References: <58028075.6000702@free.fr> Message-ID: <5802A255.90804@free.fr> Le 15/10/2016 21:16, Samuel Gougeon a ?crit : > Hello Philipp, > > Le 14/10/2016 00:08, Philipp M?hlmann a ?crit : >> Dear Scilab users, >> >> having a data file (*.cvs) containg following format: >> >> >> HEADER-Line >> dd.mm.yyyy, HH:MM:SS.MS , value01, value02 >> >> dd = day >> mm = month >> yyyy = year >> >> HH = hour >> MM = minute >> SS = second >> Ms = milli second >> >> ValueXY = numerical value >> >> Is it possible to use cvsRead in such a way to define the separator >> beeing ',' and ':' at the same time? > . > Yes and no: Yes because each character of the "separator" option is > (sometimes) considered as a > separator. And no, because it sometimes fails. > I was designing an example to add to the csvRead() page, when a found > this bug: > > --> mputl("12.08.2016, 13:54:18.45, 3.145, 548.4", TMPDIR+"/test.csv") > > --> r = "''"+csvRead("test.csv","8.",[],"string")+"''" > r = > !'12' '0' '2016, 13:54:1' '45, 3' '145, 54' '4' ! > --> // it works: both "8" and "." are *separately* considered as > separators > > --> // now trying with "," and ":": > --> r = "''"+csvRead("test.csv",",:", [], "string")+"''" > --> r = "''"+csvRead("test.csv",",:", [], "string")+"''" > r = > '12.08.2016, 13:54:18.45, 3.145, 548.4' > --> // The row is kept as is: no splitting! > --> // We could expect: ['12.08.2016' ' 13' '54' '18.45' ' 3.145' ' > 548.4'] > --> // (with leading spaces, since they are not set as separators) > --> > > There are already 10 pending reported bugs about csvRead(). One more. Report : http://bugzilla.scilab.org/14809 Each char of a separator with length > 1 is considered a specific separator only if the whole separator pattern is met in the read row. Otherwise, no splitting is done. Hence, --> r = csvRead(TMPDIR+"test.csv","8.",[],"string") // splits the "12.08.2016" row, while -->r = csvRead(TMPDIR+"test.csv",".8",[],"string") // does not! Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From Fachbueroniedermaier at bayern-mail.de Sun Oct 16 09:55:06 2016 From: Fachbueroniedermaier at bayern-mail.de (Niedermaier Holger) Date: Sun, 16 Oct 2016 09:55:06 +0200 Subject: [Scilab-users] running scilab 5.5.2 under macOS Sierra 10.12 Message-ID: <97b23bce-341a-4e88-0d98-92625602f122@bayern-mail.de> An HTML attachment was scrubbed... URL: From p.muehlmann at gmail.com Sun Oct 16 10:51:38 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Sun, 16 Oct 2016 10:51:38 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: <5802A255.90804@free.fr> References: <58028075.6000702@free.fr> <5802A255.90804@free.fr> Message-ID: Dear Samuel, Rafael, thanks for taking my initial question further to a higher level. I wouldn't have expected to create a bug out of it. So, for me: I am fine with either creating a temporary file and using fscanfMat or mfscanf(). In fact: fscanfMat() is closer to my level of code understanding, since I get a m-x-n matrix as a result with mfscanf() I get an mlist. Thanks a lot, Philipp 2016-10-15 23:40 GMT+02:00 Samuel Gougeon : > Le 15/10/2016 21:16, Samuel Gougeon a ?crit : > > Hello Philipp, > > Le 14/10/2016 00:08, Philipp M?hlmann a ?crit : > > Dear Scilab users, > > having a data file (*.cvs) containg following format: > > > HEADER-Line > dd.mm.yyyy, HH:MM:SS.MS, value01, value02 > > dd = day > mm = month > yyyy = year > > HH = hour > MM = minute > SS = second > Ms = milli second > > ValueXY = numerical value > > Is it possible to use cvsRead in such a way to define the separator beeing > ',' and ':' at the same time? > > . > Yes and no: Yes because each character of the "separator" option is > (sometimes) considered as a > separator. And no, because it sometimes fails. > I was designing an example to add to the csvRead() page, when a found this > bug: > > --> mputl("12.08.2016, 13:54:18.45, 3.145, 548.4", TMPDIR+"/test.csv") > > --> r = "''"+csvRead("test.csv","8.",[],"string")+"''" > r = > !'12' '0' '2016, 13:54:1' '45, 3' '145, 54' '4' ! > --> // it works: both "8" and "." are *separately* considered as > separators > > --> // now trying with "," and ":": > --> r = "''"+csvRead("test.csv",",:", [], "string")+"''" > --> r = "''"+csvRead("test.csv",",:", [], "string")+"''" > r = > '12.08.2016, 13:54:18.45, 3.145, 548.4' > --> // The row is kept as is: no splitting! > --> // We could expect: ['12.08.2016' ' 13' '54' '18.45' ' 3.145' ' > 548.4'] > --> // (with leading spaces, since they are not set as separators) > --> > > There are already 10 pending reported bugs about csvRead(). One more. > > Report : http://bugzilla.scilab.org/14809 > > Each char of a separator with length > 1 is considered a specific > separator only if the whole separator pattern is met in the read row. > Otherwise, no splitting is done. Hence, > --> r = csvRead(TMPDIR+"test.csv","8.",[],"string") // splits the > "12.08.2016" row, while > --> r = csvRead(TMPDIR+"test.csv",".8",[],"string") // does not! > > Samuel Gougeon > > > _______________________________________________ > 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 contact at pierre-vuillemin.fr Sun Oct 16 10:18:52 2016 From: contact at pierre-vuillemin.fr (Pierre Vuillemin) Date: Sun, 16 Oct 2016 10:18:52 +0200 Subject: [Scilab-users] Creation of a library with macros located in various folders In-Reply-To: <58024BE3.4040002@free.fr> References: <58024BE3.4040002@free.fr> Message-ID: Hello Samuel, Those are great news, I am really looking forward the release of Scilab 6! In the mean time I've managed to make something that is working (similar to your script). It will be enough until the release. Regards, Pierre Le 15/10/2016 ? 17:31, Samuel Gougeon a ?crit : > Hello Pierre, > > Scilab 6.0 will propose a new function *tbx_make*(..) that will be > able to do exactly what you want: > https://codereview.scilab.org/#/c/18071/ > > By the way, it will greatly simplify compilation of modules, and will > no longer require many cooky-files .sce like buildmacros.sce > buildoc.sce etc etc spread everywhere in the tree of files of a module. > On the forefront, tbx_make() aims to replace & merge most of functions > of the "modules manager" module, that are rather some atomic internals > not really welcome as public functions: > https://help.scilab.org/docs/6.0.0/en_US/section_d8452c14ec97df3c90ea90bb4f7d53b6.html > > If you use Scilab on Linux, you can already test tbx_make() in the > nightly built release (*). > > If you are working with Scilab 5, you may use the attached script. Its > how-to is in comments. > > Regards > Samuel > > (*) tbx_make() merged on 2016-10-02 in the master release is still > unavailable in the today NB sticking on the 2016-09-22 sources for > Windows. > > Le 12/10/2016 22:00, Pierre Vuillemin a ?crit : >> >> Hi all, >> >> I am trying to make a function similar to genlib but which goes >> recursively through folders to find .sci files, compile them and put >> them in a given target build folder. >> >> The idea is that I would like to be able to organize my 'macros' >> folder while still being able to generate a library. In particular, I >> would like to have that kind of folder organization : >> >> .../... > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Sun Oct 16 13:17:06 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Sun, 16 Oct 2016 11:17:06 +0000 Subject: [Scilab-users] mfscanf vs fscanfMat Message-ID: Fyi, if you run the previous code in order to compare the first two methods on an ASCII file with 1 million lines of input data, then the results are (had to increase stacksize on my laptop): t1 = 206.015 // r=mfscanf() --> mlist t2 = 13.8685 // M=fscanfMat() --> matrix i.e., the mfscanf solution seems to become rather slow for very large files (taking about 3.5 minutes in this last test). Why is it much slower than fscanfMat? Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Saturday, October 15, 2016 11:00 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat Hello Rafael, Le 15/10/2016 20:49, Rafael Guerra a ?crit : > .../... > > The results for a 50,000-lines input ASCII file are: > time1= 0.686404 // mfscanf > time2= 0.499203 // fscanfMat > time3= 35.3966 // csvRead . Thanks for these very convincing results. I thought that evstr() is vectorized because it is so on my PC, after having worked on it. But a trivial improvement was still unsubmitted. Repaired: https://codereview.scilab.org/#/c/18586/ Despite this improvement fasten evstr() by a factor > 10, this is not enough to reach mfscanf()'s speed. BR Samuel From arvid at softube.com Sun Oct 16 10:15:55 2016 From: arvid at softube.com (=?iso-8859-1?Q?Arvid_Ros=E9n?=) Date: Sun, 16 Oct 2016 08:15:55 +0000 Subject: [Scilab-users] running scilab 5.5.2 under macOS Sierra 10.12 In-Reply-To: <97b23bce-341a-4e88-0d98-92625602f122@bayern-mail.de> References: <97b23bce-341a-4e88-0d98-92625602f122@bayern-mail.de> Message-ID: Copying the macOS supplied version of libBLAS into the scilab bundle solved it for me. cp /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib /Applications/scilab-5.5.2.app/Contents/MacOS/lib/thirdparty/ Cheers, Arvid Get Outlook for iOS ________________________________ From: users on behalf of Niedermaier Holger Sent: Sunday, October 16, 2016 9:55:06 AM To: users at lists.scilab.org Subject: [Scilab-users] running scilab 5.5.2 under macOS Sierra 10.12 Hello, since I updated my OS to MacOS Sierra 10.12 scilab 5.5.2 is not able to start. Although running Scilab 6.0 Beta2 failed. How can I deal with? Thanks for reply. Holger -------------- next part -------------- An HTML attachment was scrubbed... URL: From arctica1963 at gmail.com Mon Oct 17 10:25:32 2016 From: arctica1963 at gmail.com (Lester Anderson) Date: Mon, 17 Oct 2016 09:25:32 +0100 Subject: [Scilab-users] using csvRead vs mfscanf and fscanfMat In-Reply-To: <580298B8.9090403@free.fr> References: <580298B8.9090403@free.fr> Message-ID: Hello, I ran the same code on my machine and actually got worse results: -->exec('Q:\Scilab_code\csvread_write.sce', -1) 1. 12. 2015. 1. 15. 0. 12. 1.1 - 2.2 1. 12. 2015. 1. 15. 0. 12. 1.1 - 2.2 !01.12.2015 1 15 0.12 1.1 -2.2 ! time1= 1.21681 time2= 2.19961 time3= 51.7923 Windows 7 64-bit and 64 Gb Ram. (Scilab 5.5.2). Is this a bug if the csvRead result is so different? Lester >> >> The results for a 50,000-lines input ASCII file are: >> time1= 0.686404 // mfscanf >> time2= 0.499203 // fscanfMat >> time3= 35.3966 // csvRead > > . From jrafaelbguerra at hotmail.com Mon Oct 17 10:43:35 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 17 Oct 2016 08:43:35 +0000 Subject: [Scilab-users] using csvRead vs mfscanf and fscanfMat In-Reply-To: References: <580298B8.9090403@free.fr> Message-ID: Hi, The problem is not with csvRead, but with the need in the example we are considering here to use the evstr function afterwards on large string data to convert it to useable numeric values. See time breakdown here below for another 50,000 line input data test: time1= 0.6552 // mfscanf time2= 0.4680 // fscanfMat time3a= 0.2028 // csvRead time3= 34.3514 // csvRead + evstr Note that method#2 writes a temporary file to disk and so it will run much faster on PC's with SSD drives. Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Lester Anderson Sent: Monday, October 17, 2016 10:26 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat Hello, I ran the same code on my machine and actually got worse results: -->exec('Q:\Scilab_code\csvread_write.sce', -1) 1. 12. 2015. 1. 15. 0. 12. 1.1 - 2.2 1. 12. 2015. 1. 15. 0. 12. 1.1 - 2.2 !01.12.2015 1 15 0.12 1.1 -2.2 ! time1= 1.21681 time2= 2.19961 time3= 51.7923 Windows 7 64-bit and 64 Gb Ram. (Scilab 5.5.2). Is this a bug if the csvRead result is so different? Lester >> >> The results for a 50,000-lines input ASCII file are: >> time1= 0.686404 // mfscanf >> time2= 0.499203 // fscanfMat >> time3= 35.3966 // csvRead > From arctica1963 at gmail.com Mon Oct 17 10:48:10 2016 From: arctica1963 at gmail.com (Lester Anderson) Date: Mon, 17 Oct 2016 09:48:10 +0100 Subject: [Scilab-users] using csvRead vs mfscanf and fscanfMat In-Reply-To: References: <580298B8.9090403@free.fr> Message-ID: Thanks for the clarification Rafael Cheers Lester On 17 October 2016 at 09:43, Rafael Guerra wrote: > Hi, > > The problem is not with csvRead, but with the need in the example we are considering here to use the evstr function afterwards on large string data to convert it to useable numeric values. > See time breakdown here below for another 50,000 line input data test: > > time1= 0.6552 // mfscanf > time2= 0.4680 // fscanfMat > time3a= 0.2028 // csvRead > time3= 34.3514 // csvRead + evstr > > Note that method#2 writes a temporary file to disk and so it will run much faster on PC's with SSD drives. > > Regards, > Rafael > > -----Original Message----- > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Lester Anderson > Sent: Monday, October 17, 2016 10:26 AM > To: Users mailing list for Scilab > Subject: Re: [Scilab-users] using csvRead vs mfscanf and fscanfMat > > Hello, I ran the same code on my machine and actually got worse results: > > -->exec('Q:\Scilab_code\csvread_write.sce', -1) > > 1. 12. 2015. 1. 15. 0. 12. 1.1 - 2.2 > > 1. 12. 2015. 1. 15. 0. 12. 1.1 - 2.2 > > !01.12.2015 1 15 0.12 1.1 -2.2 ! > > time1= 1.21681 > time2= 2.19961 > time3= 51.7923 > > Windows 7 64-bit and 64 Gb Ram. (Scilab 5.5.2). Is this a bug if the > csvRead result is so different? > > Lester > >>> >>> The results for a 50,000-lines input ASCII file are: >>> time1= 0.686404 // mfscanf >>> time2= 0.499203 // fscanfMat >>> time3= 35.3966 // csvRead >> > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From arctica1963 at gmail.com Mon Oct 17 11:27:38 2016 From: arctica1963 at gmail.com (Lester Anderson) Date: Mon, 17 Oct 2016 10:27:38 +0100 Subject: [Scilab-users] Adding header to cdvwrite output Message-ID: Hello, Quick one; sorry basic query. How do I add a header to an output from csvWrite (where the input from csvRead had none)? Test code: Data = csvRead("Data-test.csv"); // 1,2,3 // 2,4,5 // 3,6,7 // Write variables for X,Y an Z columns from input data file x = Data(:,1); y = Data(:,2); z = Data(:,3); P = z * 2; List = [x, y, P]; // writes 3 columns csvWrite(List, "Data-output.csv",',','.'); // x,y,P // 1,2,6 // 2,4,10 // 3,6,14 Thanks Lester From jrafaelbguerra at hotmail.com Mon Oct 17 12:41:02 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Mon, 17 Oct 2016 10:41:02 +0000 Subject: [Scilab-users] Adding header to cdvwrite output In-Reply-To: References: Message-ID: Sorry for the quick answer but the help file provides a clear example. Rgds -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Lester Anderson Sent: Monday, October 17, 2016 11:28 AM To: International users mailing list for Scilab. Subject: [Scilab-users] Adding header to cdvwrite output Hello, Quick one; sorry basic query. How do I add a header to an output from csvWrite (where the input from csvRead had none)? Test code: Data = csvRead("Data-test.csv"); // 1,2,3 // 2,4,5 // 3,6,7 // Write variables for X,Y an Z columns from input data file x = Data(:,1); y = Data(:,2); z = Data(:,3); P = z * 2; List = [x, y, P]; // writes 3 columns csvWrite(List, "Data-output.csv",',','.'); // x,y,P // 1,2,6 // 2,4,10 // 3,6,14 Thanks Lester From arctica1963 at gmail.com Mon Oct 17 14:27:09 2016 From: arctica1963 at gmail.com (Lester Anderson) Date: Mon, 17 Oct 2016 13:27:09 +0100 Subject: [Scilab-users] Adding header to cdvwrite output In-Reply-To: References: Message-ID: Thanks Rafael Sorted: List = [x, y, P]; // writes 3 columns heading = ["x,y,P"]; // Add x, y, P column header to csv file, list column values [] csvWrite(List, "Data-output.csv",[],[],[], heading); Lester On 17 October 2016 at 11:41, Rafael Guerra wrote: > Sorry for the quick answer but the help file provides a clear example. > Rgds > > -----Original Message----- > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Lester Anderson > Sent: Monday, October 17, 2016 11:28 AM > To: International users mailing list for Scilab. > Subject: [Scilab-users] Adding header to cdvwrite output > > Hello, > > Quick one; sorry basic query. How do I add a header to an output from > csvWrite (where the input from csvRead had none)? > > Test code: > > Data = csvRead("Data-test.csv"); > // 1,2,3 > // 2,4,5 > // 3,6,7 > > // Write variables for X,Y an Z columns from input data file > x = Data(:,1); > y = Data(:,2); > z = Data(:,3); > > P = z * 2; > > List = [x, y, P]; // writes 3 columns > > csvWrite(List, "Data-output.csv",',','.'); > // x,y,P > // 1,2,6 > // 2,4,10 > // 3,6,14 > > > Thanks > Lester > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From perrichon.pierre at wanadoo.fr Wed Oct 19 19:13:53 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Wed, 19 Oct 2016 19:13:53 +0200 Subject: [Scilab-users] WinGW doesn't run with Scilab 5.5.2 x64 W10 Message-ID: <000001d22a2c$2b9f8d50$82dea7f0$@wanadoo.fr> Dear all, I meet a system error when loading Scilab 5.5.2 x64 on a windows 10 machine. When I start Scilab, I get the error: Initialisation : Chargement de l'environnement de travail Mingw Compiler support for Scilab Load macros Warning !!! Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION) with "stacksize" function. Save your data and restart Scilab. Converting Libraries. Build libblasplus.a atomsLoad : Une erreur est survenue au cours du chargement de 'mingw-0.9.3': dos : Erreur d'allocation m?moire. See also bugzilla #14813 What can I do ? Thanks for your help 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: From perrichon.pierre at wanadoo.fr Wed Oct 19 19:52:54 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Wed, 19 Oct 2016 19:52:54 +0200 Subject: [Scilab-users] MinGW doesn't run with Scilab 5.5.2 x64 W10 Message-ID: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> PS : Following a run scilab wih the error above, if I try now to access to the Applications==>Gestionnaire de modules Atoms, I get hundred of error messages: Attention : La fonction load(file_descriptor) est obsol?te. Attention : Voir help('load') pour en savoir plus. Attention : Cette fonction sera d?finitivement supprim?e dans Scilab 6.0.0 Attention : La fonction load(file_descriptor) est obsol?te. Attention : Voir help('load') pour en savoir plus. Attention : Cette fonction sera d?finitivement supprim?e dans Scilab 6.0.0 See "Photo of the bug" in attached file De : Perrichon [mailto:perrichon.pierre at wanadoo.fr] Envoy? : mercredi 19 octobre 2016 19:14 ? : 'Users mailing list for Scilab' Objet : WinGW doesn't run with Scilab 5.5.2 x64 W10 Dear all, I meet a system error when loading Scilab 5.5.2 x64 on a windows 10 machine. When I start Scilab, I get the error: Initialisation : Chargement de l'environnement de travail Mingw Compiler support for Scilab Load macros Warning !!! Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION) with "stacksize" function. Save your data and restart Scilab. Converting Libraries. Build libblasplus.a atomsLoad : Une erreur est survenue au cours du chargement de 'mingw-0.9.3': dos : Erreur d'allocation m?moire. See also bugzilla #14813 What can I do ? Thanks for your help Sincerely Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 906 bytes Desc: not available URL: From j.s.strom at hslmg.de Thu Oct 20 11:32:13 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 20 Oct 2016 11:32:13 +0200 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> Message-ID: <58088F1D.2020901@hslmg.de> Hallo, Given the string vector M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. E. g. Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] should be converted to Mn=[12,4;2,12;6,7]. Ho can that be done in a vectorial style? Backward (given Mn) it is easier to me: Ms=matrix(M(Mn),size(Mn)) Regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike.pageone at googlemail.com Thu Oct 20 13:31:50 2016 From: mike.pageone at googlemail.com (Mike Page) Date: Thu, 20 Oct 2016 12:31:50 +0100 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: <58088F1D.2020901@hslmg.de> References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> Message-ID: Hi Jens, grep does something like what you want. -->[r,w]=grep(Ms,M); -->matrix(w,size(Ms)) ans = 12. 4. 2. 12. 6. 7. Not sure why grep produces a vector when searching for a matrix, but it seems that way. HTH, Mike. On 20 October 2016 at 10:32, Jens Simon Strom wrote: > Hallo, > Given the string vector > > M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] > which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. > E. g. > Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] > should be converted to > Mn=[12,4;2,12;6,7]. > > Ho can that be done in a vectorial style? > > Backward (given Mn) it is easier to me:Ms=matrix(M(Mn),size(Mn)) > > Regards > Jens > > > _______________________________________________ > 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.s.strom at hslmg.de Thu Oct 20 14:36:49 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 20 Oct 2016 14:36:49 +0200 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> Message-ID: <5808BA61.2080006@hslmg.de> Hi Mike, That is exactly what I needed. Solved! Thanks! Regards Jens ------------------------------------------------------------------------------------------------- Am 20.10.2016 13:31, schrieb Mike Page: > Hi Jens, > > grep does something like what you want. > > -->[r,w]=grep(Ms,M); > -->matrix(w,size(Ms)) > ans = > > 12. 4. > 2. 12. > 6. 7. > > Not sure why grep produces a vector when searching for a matrix, but > it seems that way. > > HTH, > Mike. > > > On 20 October 2016 at 10:32, Jens Simon Strom > wrote: > > Hallo, > Given the string vector > > M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] > which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. > E. g. > Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] > should be converted to > Mn=[12,4;2,12;6,7]. > > Ho can that be done in a vectorial style? > > Backward (given Mn) it is easier to me: > Ms=matrix(M(Mn),size(Mn)) > > Regards > Jens > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at esterline.com Thu Oct 20 15:41:18 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 20 Oct 2016 13:41:18 +0000 Subject: [Scilab-users] scilab and "parallelization" objectives Message-ID: <3A6B7233274DB449A2A0053A47684F953F73A0E9@BGS-EX01.auxitrol.ad> Dear All, My internship had an interesting request and I'm not able to answer to him :):) The context is the following one: - We are using a parallel finite element solver on 4 processors (under Linux), - We are performing optimization with an external optimizer, - Scilab has been interfaced with both the optimizer and the solver, - For the moment, the optimization loops are "basically" performed using the parallelization capabilities of the solvers. In practice, Scilab "runs" the solver and "waits" the end of the simulation (always using 4 processors) before calculating the cost function value, giving the later value to the optimizer and then closing. Imagine that now we would like to run 4 different simulations each on 1 processor in order to determine the gain (CPU time) ... how to proceed ? In practice Scilab must be able to : - Launch 1rst calculation and to handback ... - ... to launch the 2nd one ... and so on We can imagine creating a function per calculation (and I prefer in order to mix stuffs), then running independently but at the same time the different functions. Honestly I've never done this before and I'm wondering how to proceed ... or if it is possible : any feedback on it ? Thanks and regards 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 jrafaelbguerra at hotmail.com Thu Oct 20 19:08:44 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 20 Oct 2016 17:08:44 +0000 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> Message-ID: Hi Scilaber's, Fyi, another approach using execstr + evstr functions: // use month names in M to create 12 variables that are assigned to some 12 numbers -->execstr(M + '=' + string(1:size(M,2))); -->evstr(Ms) ans = 12. 4. 2. 12. 6. 7. This different approach will be much slower than using grep for very large input matrices. However, it is worth knowing about it because execstr is one of the most powerful Scilab functions (see for instance the Meta programming chapter in: ?Programming in Scilab?, by Michael Baudin, September 2011). Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Mike Page Sent: Thursday, October 20, 2016 1:32 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Converting string months to month numbers Hi Jens, grep does something like what you want. -->[r,w]=grep(Ms,M); -->matrix(w,size(Ms)) ?ans? = ? ??? 12.??? 4.?? ??? 2.???? 12.? ??? 6.???? 7.?? ? Not sure why grep produces a vector when searching for a matrix, but it seems that way. HTH, Mike. On 20 October 2016 at 10:32, Jens Simon Strom wrote: Hallo, Given the string vector M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. E. g. Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] should be converted to Mn=[12,4;2,12;6,7]. Ho can that be done in a vectorial style? Backward (given Mn) it is easier to me: Ms=matrix(M(Mn),size(Mn)) Regards Jens From j.s.strom at hslmg.de Thu Oct 20 21:20:12 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Thu, 20 Oct 2016 21:20:12 +0200 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> Message-ID: <580918EC.7080503@hslmg.de> Hi Rafael, I had a hard but successful time to understand the approach. Almost magic! Here is the complete executable snippet: M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; n=size(M,2); Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul']; execstr(M + '=' + string(1:n))//equivalent to Jan=1., Feb=2., ..., Dec=12. M remains unchanged evstr(Ms)//matrix of numbers Regards Jens ----------------------------------------------------- Am 20.10.2016 19:08, schrieb Rafael Guerra: > Hi Scilaber's, > > Fyi, another approach using execstr + evstr functions: > > // use month names in M to create 12 variables that are assigned to some 12 numbers > -->execstr(M + '=' + string(1:size(M,2))); > -->evstr(Ms) > ans = > 12. 4. > 2. 12. > 6. 7. > > This different approach will be much slower than using grep for very large input matrices. > However, it is worth knowing about it because execstr is one of the most powerful Scilab functions (see for instance the Meta programming chapter in: ?Programming in Scilab?, by Michael Baudin, September 2011). > > Regards, > Rafael > > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Mike Page > Sent: Thursday, October 20, 2016 1:32 PM > To: Users mailing list for Scilab > Subject: Re: [Scilab-users] Converting string months to month numbers > > Hi Jens, > grep does something like what you want. > > -->[r,w]=grep(Ms,M); > -->matrix(w,size(Ms)) > ans = > > 12. 4. > 2. 12. > 6. 7. > > Not sure why grep produces a vector when searching for a matrix, but it seems that way. > HTH, > Mike. > > On 20 October 2016 at 10:32, Jens Simon Strom wrote: > Hallo, > Given the string vector > > M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] > which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. > E. g. > Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] > should be converted to > Mn=[12,4;2,12;6,7]. > > Ho can that be done in a vectorial style? > > Backward (given Mn) it is easier to me: > Ms=matrix(M(Mn),size(Mn)) > > Regards > Jens > > > > _______________________________________________ > 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.s.strom at hslmg.de Fri Oct 21 10:49:16 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Fri, 21 Oct 2016 10:49:16 +0200 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> Message-ID: <5809D68C.4020605@hslmg.de> Hi Scilabers, Rafael's approach motivated me to share the following function with you. function y=findbystr(x,X,Y)//find Y(x) from Y(X), X and x beeing string matrices //X: keys to Y, matrix of strings //Y: values allocated to X, matrix of constants, number of rows and colums like X //x: argument keys, matrix of strings which are elements of X //y: values for x, matrix of constants, numbers of rows and colums like x // findbystr() finds numerical values y by their string keys x. The string number allocation is defined bei X and Y. execstr(X+'='+string(Y)) y=evstr(x) endfunction //Example X=['a','b';'c','d'] Y=[ 10, 20; 30, 40] y=findbystr(['d','c','b';'c','b','a'],X,Y) The function would have been useful to me in the past several times - and certainly in the future. Regards Jens ------------------------------------------------------------------------- Am 20.10.2016 19:08, schrieb Rafael Guerra: > Hi Scilaber's, > > Fyi, another approach using execstr + evstr functions: > > // use month names in M to create 12 variables that are assigned to some 12 numbers > -->execstr(M + '=' + string(1:size(M,2))); > -->evstr(Ms) > ans = > 12. 4. > 2. 12. > 6. 7. > > This different approach will be much slower than using grep for very large input matrices. > However, it is worth knowing about it because execstr is one of the most powerful Scilab functions (see for instance the Meta programming chapter in: ?Programming in Scilab?, by Michael Baudin, September 2011). > > Regards, > Rafael > > From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Mike Page > Sent: Thursday, October 20, 2016 1:32 PM > To: Users mailing list for Scilab > Subject: Re: [Scilab-users] Converting string months to month numbers > > Hi Jens, > grep does something like what you want. > > -->[r,w]=grep(Ms,M); > -->matrix(w,size(Ms)) > ans = > > 12. 4. > 2. 12. > 6. 7. > > Not sure why grep produces a vector when searching for a matrix, but it seems that way. > HTH, > Mike. > > On 20 October 2016 at 10:32, Jens Simon Strom wrote: > Hallo, > Given the string vector > > M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] > which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. > E. g. > Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] > should be converted to > Mn=[12,4;2,12;6,7]. > > Ho can that be done in a vectorial style? > > Backward (given Mn) it is easier to me: > Ms=matrix(M(Mn),size(Mn)) > > Regards > Jens > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-philippe.grivet at wanadoo.fr Fri Oct 21 11:22:38 2016 From: jean-philippe.grivet at wanadoo.fr (jean-philippe grivet) Date: Fri, 21 Oct 2016 11:22:38 +0200 Subject: [Scilab-users] using csvRead In-Reply-To: <580232E7.4090505@free.fr> References: <580232E7.4090505@free.fr> Message-ID: <5809DE5E.4080603@wanadoo.fr> Both vi and emacs can handle vary large files. You could use either to replace all separatots by commas and then use csvRead. Le 15/10/2016 15:45, Samuel Gougeon a ?crit : > Hello > > Le 14/10/2016 00:08, Philipp M?hlmann a ?crit : >> Dear Scilab users, >> >> having a data file (*.cvs) containg following format: >> >> >> HEADER-Line >> dd.mm.yyyy, HH:MM:SS.MS , value01, value02 >> >> dd = day >> mm = month >> yyyy = year >> >> HH = hour >> MM = minute >> SS = second >> Ms = milli second >> >> ValueXY = numerical value >> >> Is it possible to use cvsRead in such a way to define the separator >> beeing ',' and ':' at the same time? > Beside the solution provided by Serge, if you wish to stick to > csvRead(), have you tried using its "substitute" option, with a [":" > ","] value? > I didn't, but would be interested by results. I am wondering whether > the substitution is done before splitting the line with the separator > (then "substitute" will work), or after. This detail would deserve > being documented. > > Read you soon > Samuel Gougeon > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users --- L'absence de virus dans ce courrier ?lectronique a ?t? v?rifi?e par le logiciel antivirus Avast. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Fri Oct 21 17:12:49 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Fri, 21 Oct 2016 17:12:49 +0200 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: <5809D68C.4020605@hslmg.de> References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> <5809D68C.4020605@hslmg.de> Message-ID: Hi Jens Thanks for sharing. :-) Best regards, Claus On 21-10-2016 10:49, Jens Simon Strom wrote: > Hi Scilabers, > Rafael's approach motivated me to share the following function with you. > > function y=findbystr(x, X, Y)//find Y(x) from Y(X), X and x beeing string matrices > //X: keys to Y, matrix of strings > //Y: values allocated to X, matrix of constants, number of rows and > colums like X > //x: argument keys, matrix of strings which are elements of X > //y: values for x, matrix of constants, numbers of rows and colums like x > // findbystr() finds numerical values y by their string keys x. The > string number allocation is defined bei X and Y. > execstr(X+'='+string(Y)) > y=evstr(x) > endfunction > > //Example > X=['a','b';'c','d'] > Y=[ 10, 20; 30, 40] > y=findbystr(['d','c','b';'c','< /span>b','a'],X,Y) > > The function would have been useful to me in the past several times > - and certainly in the future. > > Regards > Jens > ------------------------------------------------------------------------- > Am 20.10.2016 19:08, schrieb Rafael Guerra: >> Hi Scilaber's, >> >> Fyi, another approach using execstr + evstr functions: >> >> // use month names in M to create 12 variables that are assigned to some 12 numbers >> -->execstr(M + '=' + string(1:size(M,2))); >> -->evstr(Ms) >> ans = >> 12. 4. >> 2. 12. >> 6. 7. >> >> This different approach will be much slower than using grep for very large input matrices. >> However, it is worth knowing about it because execstr is one of the most powerful Scilab functions (see for instance the Meta programming chapter in: ?Programming in Scilab?, by Michael Baudin, September 2011). >> >> Regards, >> Rafael >> >> From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Mike Page >> Sent: Thursday, October 20, 2016 1:32 PM >> To: Users mailing list for Scilab >> Subject: Re: [Scilab-users] Converting string months to month numbers >> >> Hi Jens, >> grep does something like what you want. >> >> -->[r,w]=grep(Ms,M); >> -->matrix(w,size(Ms)) >> ans = >> >> 12. 4. >> 2. 12. >> 6. 7. >> >> Not sure why grep produces a vector when searching for a matrix, but it seems that way. >> HTH, >> Mike. >> >> On 20 October 2016 at 10:32, Jens Simon Strom wrote: >> Hallo, >> Given the string vector >> >> M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] >> which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. >> E. g. >> Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] >> should be converted to >> Mn=[12,4;2,12;6,7]. >> >> Ho can that be done in a vectorial style? >> >> Backward (given Mn) it is easier to me: >> Ms=matrix(M(Mn),size(Mn)) >> >> Regards >> Jens >> >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Fri Oct 21 19:17:48 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 21 Oct 2016 19:17:48 +0200 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> Message-ID: <580A4DBC.4020109@free.fr> Hello, Le 20/10/2016 13:31, Mike Page a ?crit : > Hi Jens, > > grep does something like what you want. > > -->[r,w]=grep(Ms,M); > -->matrix(w,size(Ms)) > ans = > > 12. 4. > 2. 12. > 6. 7. > > Not sure why grep produces a vector when searching for a matrix, but > it seems that way. . Because in the general case, there may be no match between Ms and M components. In that case, r is shorter than Ms, and matrix() can't be used. BR From sgougeon at free.fr Fri Oct 21 19:24:51 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 21 Oct 2016 19:24:51 +0200 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: <58088F1D.2020901@hslmg.de> References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> Message-ID: <580A4F63.1060507@free.fr> Le 20/10/2016 11:32, Jens Simon Strom a ?crit : > Hallo, > Given the string vector > > M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] > which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. > E. g. > Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] > should be converted to > Mn=[12,4;2,12;6,7]. > > Ho can that be done in a vectorial style? . It is the members()'s job, that works whatever is the type of data (not only texts): M = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; Ms = ['Dec','Apr';'Feb','Dec';'Jun','Jul']; [tmp, Mn] = members(Ms, M); Mn --> M = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; --> Ms = ['Dec','Apr';'Feb','Dec';'Jun','Jul']; --> [tmp, Mn] = members(Ms, M); Mn Mn = 12. 4. 2. 12. 6. 7. HTH Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Fri Oct 21 22:35:56 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Fri, 21 Oct 2016 22:35:56 +0200 Subject: [Scilab-users] Converting string months to month numbers In-Reply-To: <580A4F63.1060507@free.fr> References: <001301d22a31$9e9dc6f0$dbd954d0$@wanadoo.fr> <58088F1D.2020901@hslmg.de> <580A4F63.1060507@free.fr> Message-ID: <580A7C2C.9000006@hslmg.de> Hallo, Knowing execstr(), evstr(), and grep() now I would leave them alone and use members(). Here is my example. function y=!keytovalue(x,X,Y)//extract values by key //X: key, matrix of constants or strings //Y: value, matrix, shape as X, not necessarily type //x: request key, matrix, containing elements of X only //y: value at x, matrix, shape as x, type as Y [nb,loc] = members(x, X) y=matrix(Y(loc),size(x)) endfunction //Example X=['a','c'; 'b','d']; Y=[ 'aa', 'cc';'bb','dd']; y=!keytovalue(['d','c','b';'c','b','a'],X,Y) Regards Jens -------------------------------------------------------------------------------------------------------------------------------------------------- Am 21.10.2016 19:24, schrieb Samuel Gougeon: > Le 20/10/2016 11:32, Jens Simon Strom a ?crit : >> Hallo, >> Given the string vector >> >> M=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] >> which implicitly maps the string representation of the months to their number representataion I would like to map any string matrix containing elements of M into a numercal matrix showing the month numbers. >> E. g. >> Ms=['Dec','Apr';'Feb','Dec';'Jun','Jul'] >> should be converted to >> Mn=[12,4;2,12;6,7]. >> >> Ho can that be done in a vectorial style? > > . > It is the members()'s job, that works whatever is the type of data > (not only texts): > M = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; > Ms = ['Dec','Apr';'Feb','Dec';'Jun','Jul']; > [tmp, Mn] = members(Ms, M); Mn > > --> M = > ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; > > --> Ms = ['Dec','Apr';'Feb','Dec';'Jun','Jul']; > --> [tmp, Mn] = members(Ms, M); Mn > Mn = > 12. 4. > 2. 12. > 6. 7. > > HTH > 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 paul.carrico at free.fr Sat Oct 22 09:33:24 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Sat, 22 Oct 2016 09:33:24 +0200 (CEST) Subject: [Scilab-users] scilab and "parallelization" objectives In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F73A0E9@BGS-EX01.auxitrol.ad> Message-ID: <2086415799.425433287.1477121604275.JavaMail.root@zimbra5-e1.priv.proxad.net> Hi All Maybe my previous email was unclear, but the example hereafter summarizes what I would like to do : - here function is launched when the previous is finished ("sequential way"), - it is possible to launch them simultaneously? Nb : I'm currently on Scilab 5.5.4 and maybe only the latest beta release allows this ? If I can do this, then "bingo" Thanks Paul --------------------------------------------------------------- mode ( 0 ) function status = test ( i , t ) printf ( " function %d is launched\n " , i ) ; sleep ( t * 1000 ) ; printf ( " function %d is endeed\n\n " , i ) ; status = 0 ; endfunction // the duration is expressed in second(s) status = test ( 1 , 1 ) ; status = test ( 2 , 3 ) ; status = test ( 3 , 5 ) ; status = test ( 4 , 7 ) ; ----- Mail original ----- De: "Paul Carrico" ?: "International users mailing list for Scilab. (users at lists.scilab.org)" Envoy?: Jeudi 20 Octobre 2016 15:41:18 Objet: [Scilab-users] scilab and "parallelization" objectives Dear All, My internship had an interesting request and I?m not able to answer to him JJ The context is the following one: - We are using a parallel finite element solver on 4 processors (under Linux), - We are performing optimization with an external optimizer, - Scilab has been interfaced with both the optimizer and the solver, - For the moment, the optimization loops are ?basically? performed using the parallelization capabilities of the solvers. In practice, Scilab ?runs? the solver and ?waits? the end of the simulation (always using 4 processors) before calculating the cost function value, giving the later value to the optimizer and then closing. Imagine that now we would like to run 4 different simulations each on 1 processor in order to determine the gain (CPU time) ? how to proceed ? In practice Scilab must be able to : - Launch 1rst calculation and to handback ? - ? to launch the 2 nd one ? and so on We can imagine creating a function per calculation (and I prefer in order to mix stuffs), then running independently but at the same time the different functions. Honestly I?ve never done this before and I?m wondering how to proceed ? or if it is possible : any feedback on it ? Thanks and regards Paul EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From cfuttrup at gmail.com Sat Oct 22 10:26:41 2016 From: cfuttrup at gmail.com (Claus Futtrup) Date: Sat, 22 Oct 2016 10:26:41 +0200 Subject: [Scilab-users] scilab and "parallelization" objectives In-Reply-To: <2086415799.425433287.1477121604275.JavaMail.root@zimbra5-e1.priv.proxad.net> References: <2086415799.425433287.1477121604275.JavaMail.root@zimbra5-e1.priv.proxad.net> Message-ID: <4b7d4a7f-d9cd-3e95-0aa4-579b1979db9d@gmail.com> Hi Paul Have you/he/she looked into parallel_run() ? Best regards, Claus On 22-10-2016 09:33, paul.carrico at free.fr wrote: > Hi All > > Maybe my previous email was unclear, but the example hereafter > summarizes what I would like to do : > - here function is launched when the previous is finished ("sequential > way"), > - it is possible to launch them simultaneously? > > /_Nb_/: I'm currently on Scilab 5.5.4 and maybe only the latest beta > release allows this ? > > If I can do this, then "bingo" > > Thanks > > Paul > --------------------------------------------------------------- > mode(0) function status=test(i, t) printf("function %d is > launched\n",i); sleep(t*1000); printf("function %d is endeed\n\n",i); > status = 0; endfunction // the duration is expressed in second(s) > status = test(1,1); status = test(2,3); status = test(3,5); status = > test(4,7); > > ------------------------------------------------------------------------ > *De: *"Paul Carrico" > *?: *"International users mailing list for Scilab. > (users at lists.scilab.org)" > *Envoy?: *Jeudi 20 Octobre 2016 15:41:18 > *Objet: *[Scilab-users] scilab and "parallelization" objectives > > Dear All, > > My internship had an interesting request and I?m not able to answer to > him JJ > > The context is the following one: > > -We are using a parallel finite element solver on *_4 processors_* > (under Linux), > > -We are performing optimization with an external optimizer, > > -Scilab has been interfaced with both the optimizer and the solver, > > -For the moment, the optimization loops are ?basically? performed > using the parallelization capabilities of the solvers. > > In practice, Scilab ?runs? the solver and ?waits? the end of the > simulation (always using 4 processors) before calculating the cost > function value, giving the later value to the optimizer and then closing. > > *_Imagine that now_*we would like to run *_4 different simulations > each on 1 processor_* in order to determine the gain (CPU time) ? how > to proceed ? > > In practice Scilab must be able to : > > -Launch 1rst calculation and to handback ? > > -? to launch the 2^nd one ? and so on > > We can imagine creating _a function per calculation _(and I prefer in > order to mix stuffs), then running independently but at the same time > the different functions. > > Honestly I?ve never done this before and I?m wondering how to proceed > ? or if it is possible : any feedback on it ? > > Thanks and regards > > Paul > > */EXPORT CONTROL : > /**Cet email ne contient pas de donn?es techniques > This email does not contain technical data* > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Sat Oct 22 15:11:02 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Sat, 22 Oct 2016 15:11:02 +0200 Subject: [Scilab-users] scilab and "parallelization" objectives In-Reply-To: <4b7d4a7f-d9cd-3e95-0aa4-579b1979db9d@gmail.com> References: <2086415799.425433287.1477121604275.JavaMail.root@zimbra5-e1.priv.proxad.net> <4b7d4a7f-d9cd-3e95-0aa4-579b1979db9d@gmail.com> Message-ID: <1e407b41aaf7be42b22014f52eada33c@free.fr> Thanks claus I completely forgot this features (that I've ever tested but once only) The first trial "works" if I focus only on the results, but as one can see on the screenshot, a part of the message appears in the console and the second one in the terminal (why ????). The code is the following one for my very basic exemple (I used 2 CPU's here because of my laptop features) Paul ###################################################################################### mode(0) function status=test(i, t) printf("function %d is launched with a pause of %g second(s)\n",i,t); sleep(t*1000); printf("function %d is endeed\n\n",i); status = 0; endfunction // the duration is expressed in second(s) //status = test(1,1); //status = test(2,3); //status = test(3,5); //status = test(4,7); number = [1 2] duration = [1 3] status = parallel_run(number,duration,"test") Le 2016-10-22 10:26, Claus Futtrup a ?crit : > Hi Paul > > Have you/he/she looked into parallel_run() ? > > Best regards, > Claus > > On 22-10-2016 09:33, paul.carrico at free.fr wrote: > >> Hi All >> >> Maybe my previous email was unclear, but the example hereafter >> summarizes what I would like to do : >> - here function is launched when the previous is finished >> ("sequential way"), >> - it is possible to launch them simultaneously? >> >> _Nb_: I'm currently on Scilab 5.5.4 and maybe only the latest beta >> release allows this ? >> >> If I can do this, then "bingo" >> >> Thanks >> >> Paul >> --------------------------------------------------------------- >> >> mode(0) >> >> function status=test(i, t) >> printf("function %d is launched\n",i); >> sleep(t*1000); >> printf("function %d is endeed\n\n",i); >> status = 0; >> endfunction >> >> // the duration is expressed in second(s) >> status = test(1,1); >> status = test(2,3); >> status = test(3,5); >> status = test(4,7); >> >> ------------------------- >> >> DE: "Paul Carrico" >> ?: "International users mailing list for Scilab. >> (users at lists.scilab.org)" >> ENVOY?: Jeudi 20 Octobre 2016 15:41:18 >> OBJET: [Scilab-users] scilab and "parallelization" objectives >> >> Dear All, >> >> My internship had an interesting request and I'm not able to >> answer to him JJ >> >> The context is the following one: >> >> - We are using a parallel finite element solver on 4 >> PROCESSORS (under Linux), >> >> - We are performing optimization with an external >> optimizer, >> >> - Scilab has been interfaced with both the optimizer and >> the solver, >> >> - For the moment, the optimization loops are >> "basically" performed using the parallelization capabilities of >> the solvers. >> >> In practice, Scilab "runs" the solver and "waits" the end of >> the simulation (always using 4 processors) before calculating the >> cost function value, giving the later value to the optimizer and >> then closing. >> >> IMAGINE THAT NOW we would like to run 4 DIFFERENT SIMULATIONS EACH >> ON 1 PROCESSOR in order to determine the gain (CPU time) ? how to >> proceed ? >> >> In practice Scilab must be able to : >> >> - Launch 1rst calculation and to handback ? >> >> - ? to launch the 2nd one ? and so on >> >> We can imagine creating a function per calculation (and I prefer in >> order to mix stuffs), then running independently but at the same >> time the different functions. >> >> Honestly I've never done this before and I'm wondering how to >> proceed ? or if it is possible : any feedback on it ? >> >> Thanks and regards >> >> Paul >> >> EXPORT CONTROL : >> Cet email ne contient pas de donn?es techniques >> This email does not contain technical data >> >> _______________________________________________ >> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot.jpg Type: image/jpeg Size: 47433 bytes Desc: not available URL: From stephane.mottelet at utc.fr Sat Oct 22 16:33:22 2016 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sat, 22 Oct 2016 16:33:22 +0200 Subject: [Scilab-users] scilab and "parallelization" objectives In-Reply-To: <1e407b41aaf7be42b22014f52eada33c@free.fr> References: <2086415799.425433287.1477121604275.JavaMail.root@zimbra5-e1.priv.proxad.net> <4b7d4a7f-d9cd-3e95-0aa4-579b1979db9d@gmail.com> <1e407b41aaf7be42b22014f52eada33c@free.fr> Message-ID: Hello, As parallel_run is using child Scilab processes, the std output of all children is the terminal where you started Scilab and not the Scilab console. S. > Le 22 oct. 2016 ? 15:11, paul.carrico at free.fr a ?crit : > > Thanks claus > > I completely forgot this features (that I've ever tested but once only) > > The first trial "works" if I focus only on the results, but as one can see on the screenshot, a part of the message appears in the console and the second one in the terminal (why ????). > > The code is the following one for my very basic exemple (I used 2 CPU's here because of my laptop features) > > Paul > > ###################################################################################### > mode(0) > > function status=test(i, t) > printf("function %d is launched with a pause of %g second(s)\n",i,t); > sleep(t*1000); > printf("function %d is endeed\n\n",i); > status = 0; > endfunction > > // the duration is expressed in second(s) > //status = test(1,1); > //status = test(2,3); > //status = test(3,5); > //status = test(4,7); > > number = [1 2] > duration = [1 3] > status = parallel_run(number,duration,"test") > > Le 2016-10-22 10:26, Claus Futtrup a ?crit : >> >> Hi Paul >> >> Have you/he/she looked into parallel_run() ? >> >> Best regards, >> Claus >> >> On 22-10-2016 09:33, paul.carrico at free.fr wrote: >> >>> Hi All >>> >>> Maybe my previous email was unclear, but the example hereafter >>> summarizes what I would like to do : >>> - here function is launched when the previous is finished >>> ("sequential way"), >>> - it is possible to launch them simultaneously? >>> >>> _Nb_: I'm currently on Scilab 5.5.4 and maybe only the latest beta >>> release allows this ? >>> >>> If I can do this, then "bingo" >>> >>> Thanks >>> >>> Paul >>> --------------------------------------------------------------- >>> >>> mode(0) >>> >>> function status=test(i, t) >>> printf("function %d is launched\n",i); >>> sleep(t*1000); >>> printf("function %d is endeed\n\n",i); >>> status = 0; >>> endfunction >>> >>> // the duration is expressed in second(s) >>> status = test(1,1); >>> status = test(2,3); >>> status = test(3,5); >>> status = test(4,7); >>> >>> ------------------------- >>> >>> DE: "Paul Carrico" >>> ?: "International users mailing list for Scilab. >>> (users at lists.scilab.org)" >>> ENVOY?: Jeudi 20 Octobre 2016 15:41:18 >>> OBJET: [Scilab-users] scilab and "parallelization" objectives >>> >>> Dear All, >>> >>> My internship had an interesting request and I?m not able to >>> answer to him JJ >>> >>> The context is the following one: >>> >>> - We are using a parallel finite element solver on 4 >>> PROCESSORS (under Linux), >>> >>> - We are performing optimization with an external >>> optimizer, >>> >>> - Scilab has been interfaced with both the optimizer and >>> the solver, >>> >>> - For the moment, the optimization loops are >>> ?basically? performed using the parallelization capabilities of >>> the solvers. >>> >>> In practice, Scilab ?runs? the solver and ?waits? the end of >>> the simulation (always using 4 processors) before calculating the >>> cost function value, giving the later value to the optimizer and >>> then closing. >>> >>> IMAGINE THAT NOW we would like to run 4 DIFFERENT SIMULATIONS EACH >>> ON 1 PROCESSOR in order to determine the gain (CPU time) ? how to >>> proceed ? >>> >>> In practice Scilab must be able to : >>> >>> - Launch 1rst calculation and to handback ? >>> >>> - ? to launch the 2nd one ? and so on >>> >>> We can imagine creating a function per calculation (and I prefer in >>> order to mix stuffs), then running independently but at the same >>> time the different functions. >>> >>> Honestly I?ve never done this before and I?m wondering how to >>> proceed ? or if it is possible : any feedback on it ? >>> >>> Thanks and regards >>> >>> Paul >>> >>> EXPORT CONTROL : >>> Cet email ne contient pas de donn?es techniques >>> This email does not contain technical data >>> >>> _______________________________________________ >>> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From arvid at softube.com Sat Oct 22 19:50:43 2016 From: arvid at softube.com (=?Windows-1252?Q?Arvid_Ros=E9n?=) Date: Sat, 22 Oct 2016 17:50:43 +0000 Subject: [Scilab-users] scilab and "parallelization" objectives In-Reply-To: References: <2086415799.425433287.1477121604275.JavaMail.root@zimbra5-e1.priv.proxad.net> <4b7d4a7f-d9cd-3e95-0aa4-579b1979db9d@gmail.com> <1e407b41aaf7be42b22014f52eada33c@free.fr>, Message-ID: What OS are you running? parallel_run does not work on macOS. It does work on Linux though. Cheers, Arvid Get Outlook for iOS ________________________________ From: users on behalf of St?phane Mottelet Sent: Saturday, October 22, 2016 4:33:22 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] scilab and "parallelization" objectives Hello, As parallel_run is using child Scilab processes, the std output of all children is the terminal where you started Scilab and not the Scilab console. S. Le 22 oct. 2016 ? 15:11, paul.carrico at free.fr a ?crit : Thanks claus I completely forgot this features (that I've ever tested but once only) The first trial "works" if I focus only on the results, but as one can see on the screenshot, a part of the message appears in the console and the second one in the terminal (why ????). The code is the following one for my very basic exemple (I used 2 CPU's here because of my laptop features) Paul ###################################################################################### mode(0) function status=test(i, t) printf("function %d is launched with a pause of %g second(s)\n",i,t); sleep(t*1000); printf("function %d is endeed\n\n",i); status = 0; endfunction // the duration is expressed in second(s) //status = test(1,1); //status = test(2,3); //status = test(3,5); //status = test(4,7); number = [1 2] duration = [1 3] status = parallel_run(number,duration,"test") Le 2016-10-22 10:26, Claus Futtrup a ?crit : Hi Paul Have you/he/she looked into parallel_run() ? Best regards, Claus On 22-10-2016 09:33, paul.carrico at free.fr wrote: Hi All Maybe my previous email was unclear, but the example hereafter summarizes what I would like to do : - here function is launched when the previous is finished ("sequential way"), - it is possible to launch them simultaneously? _Nb_: I'm currently on Scilab 5.5.4 and maybe only the latest beta release allows this ? If I can do this, then "bingo" Thanks Paul --------------------------------------------------------------- mode(0) function status=test(i, t) printf("function %d is launched\n",i); sleep(t*1000); printf("function %d is endeed\n\n",i); status = 0; endfunction // the duration is expressed in second(s) status = test(1,1); status = test(2,3); status = test(3,5); status = test(4,7); ------------------------- DE: "Paul Carrico" > ?: "International users mailing list for Scilab. (users at lists.scilab.org)" > ENVOY?: Jeudi 20 Octobre 2016 15:41:18 OBJET: [Scilab-users] scilab and "parallelization" objectives Dear All, My internship had an interesting request and I?m not able to answer to him JJ The context is the following one: - We are using a parallel finite element solver on 4 PROCESSORS (under Linux), - We are performing optimization with an external optimizer, - Scilab has been interfaced with both the optimizer and the solver, - For the moment, the optimization loops are ?basically? performed using the parallelization capabilities of the solvers. In practice, Scilab ?runs? the solver and ?waits? the end of the simulation (always using 4 processors) before calculating the cost function value, giving the later value to the optimizer and then closing. IMAGINE THAT NOW we would like to run 4 DIFFERENT SIMULATIONS EACH ON 1 PROCESSOR in order to determine the gain (CPU time) ? how to proceed ? In practice Scilab must be able to : - Launch 1rst calculation and to handback ? - ? to launch the 2nd one ? and so on We can imagine creating a function per calculation (and I prefer in order to mix stuffs), then running independently but at the same time the different functions. Honestly I?ve never done this before and I?m wondering how to proceed ? or if it is possible : any feedback on it ? Thanks and regards Paul EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at free.fr Sat Oct 22 21:06:47 2016 From: paul.carrico at free.fr (paul.carrico at free.fr) Date: Sat, 22 Oct 2016 21:06:47 +0200 (CEST) Subject: [Scilab-users] =?utf-8?q?Re=C2=A0=3A_Re=3A__scilab_and_=22paralle?= =?utf-8?q?lization=22_objectives?= In-Reply-To: Message-ID: <1323444447.427494059.1477163207219.JavaMail.root@zimbra5-e1.priv.proxad.net> The features has been tested on my laptop under ubuntu 16.04 LTS Paul ----- Mail d'origine ----- De: Arvid Ros?n ?: Users mailing list for Scilab Envoy?: Sat, 22 Oct 2016 19:50:43 +0200 (CEST) Objet: Re: [Scilab-users] scilab and "parallelization" objectives What OS are you running? parallel_run does not work on macOS. It does work on Linux though. Cheers, Arvid Get Outlook for iOS ________________________________ From: users on behalf of St?phane Mottelet Sent: Saturday, October 22, 2016 4:33:22 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] scilab and "parallelization" objectives Hello, As parallel_run is using child Scilab processes, the std output of all children is the terminal where you started Scilab and not the Scilab console. S. Le 22 oct. 2016 ? 15:11, paul.carrico at free.fr a ?crit : Thanks claus I completely forgot this features (that I've ever tested but once only) The first trial "works" if I focus only on the results, but as one can see on the screenshot, a part of the message appears in the console and the second one in the terminal (why ????). The code is the following one for my very basic exemple (I used 2 CPU's here because of my laptop features) Paul ###################################################################################### mode(0) function status=test(i, t) printf("function %d is launched with a pause of %g second(s)n",i,t); sleep(t*1000); printf("function %d is endeednn",i); status = 0; endfunction // the duration is expressed in second(s) //status = test(1,1); //status = test(2,3); //status = test(3,5); //status = test(4,7); number = [1 2] duration = [1 3] status = parallel_run(number,duration,"test") Le 2016-10-22 10:26, Claus Futtrup a ?crit : Hi Paul Have you/he/she looked into parallel_run() ? Best regards, Claus On 22-10-2016 09:33, paul.carrico at free.fr wrote: Hi All Maybe my previous email was unclear, but the example hereafter summarizes what I would like to do : - here function is launched when the previous is finished ("sequential way"), - it is possible to launch them simultaneously? _Nb_: I'm currently on Scilab 5.5.4 and maybe only the latest beta release allows this ? If I can do this, then "bingo" Thanks Paul --------------------------------------------------------------- mode(0) function status=test(i, t) printf("function %d is launchedn",i); sleep(t*1000); printf("function %d is endeednn",i); status = 0; endfunction // the duration is expressed in second(s) status = test(1,1); status = test(2,3); status = test(3,5); status = test(4,7); ------------------------- DE: "Paul Carrico" > ?: "International users mailing list for Scilab. (users at lists.scilab.org)" > ENVOY?: Jeudi 20 Octobre 2016 15:41:18 OBJET: [Scilab-users] scilab and "parallelization" objectives Dear All, My internship had an interesting request and I?m not able to answer to him JJ The context is the following one: - We are using a parallel finite element solver on 4 PROCESSORS (under Linux), - We are performing optimization with an external optimizer, - Scilab has been interfaced with both the optimizer and the solver, - For the moment, the optimization loops are ?basically? performed using the parallelization capabilities of the solvers. In practice, Scilab ?runs? the solver and ?waits? the end of the simulation (always using 4 processors) before calculating the cost function value, giving the later value to the optimizer and then closing. IMAGINE THAT NOW we would like to run 4 DIFFERENT SIMULATIONS EACH ON 1 PROCESSOR in order to determine the gain (CPU time) ? how to proceed ? In practice Scilab must be able to : - Launch 1rst calculation and to handback ? - ? to launch the 2nd one ? and so on We can imagine creating a function per calculation (and I prefer in order to mix stuffs), then running independently but at the same time the different functions. Honestly I?ve never done this before and I?m wondering how to proceed ? or if it is possible : any feedback on it ? Thanks and regards Paul EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data _______________________________________________ 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 stephane.mottelet at utc.fr Sun Oct 23 09:17:24 2016 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sun, 23 Oct 2016 09:17:24 +0200 Subject: [Scilab-users] scilab and "parallelization" objectives In-Reply-To: References: <2086415799.425433287.1477121604275.JavaMail.root@zimbra5-e1.priv.proxad.net> <4b7d4a7f-d9cd-3e95-0aa4-579b1979db9d@gmail.com> <1e407b41aaf7be42b22014f52eada33c@free.fr> Message-ID: Parallel_run works under OS X with 5.5.1 (not 5.5.2) if you use a little trick I posted a long time ago. If you add a line such as unix_g(":") at the end of the function which is called, then it works like a charm. S. > Le 22 oct. 2016 ? 19:50, Arvid Ros?n a ?crit : > > What OS are you running? parallel_run does not work on macOS. It does work on Linux though. > > Cheers, > Arvid > > Get Outlook for iOS > > > From: users on behalf of St?phane Mottelet > Sent: Saturday, October 22, 2016 4:33:22 PM > To: Users mailing list for Scilab > Subject: Re: [Scilab-users] scilab and "parallelization" objectives > > Hello, > > As parallel_run is using child Scilab processes, the std output of all children is the terminal where you started Scilab and not the Scilab console. > > S. > > Le 22 oct. 2016 ? 15:11, paul.carrico at free.fr a ?crit : > >> Thanks claus >> >> I completely forgot this features (that I've ever tested but once only) >> >> The first trial "works" if I focus only on the results, but as one can see on the screenshot, a part of the message appears in the console and the second one in the terminal (why ????). >> >> The code is the following one for my very basic exemple (I used 2 CPU's here because of my laptop features) >> >> Paul >> >> ###################################################################################### >> mode(0) >> >> function status=test(i, t) >> printf("function %d is launched with a pause of %g second(s)\n",i,t); >> sleep(t*1000); >> printf("function %d is endeed\n\n",i); >> status = 0; >> endfunction >> >> // the duration is expressed in second(s) >> //status = test(1,1); >> //status = test(2,3); >> //status = test(3,5); >> //status = test(4,7); >> >> number = [1 2] >> duration = [1 3] >> status = parallel_run(number,duration,"test") >> >> Le 2016-10-22 10:26, Claus Futtrup a ?crit : >>> >>> Hi Paul >>> >>> Have you/he/she looked into parallel_run() ? >>> >>> Best regards, >>> Claus >>> >>> On 22-10-2016 09:33, paul.carrico at free.fr wrote: >>> >>>> Hi All >>>> >>>> Maybe my previous email was unclear, but the example hereafter >>>> summarizes what I would like to do : >>>> - here function is launched when the previous is finished >>>> ("sequential way"), >>>> - it is possible to launch them simultaneously? >>>> >>>> _Nb_: I'm currently on Scilab 5.5.4 and maybe only the latest beta >>>> release allows this ? >>>> >>>> If I can do this, then "bingo" >>>> >>>> Thanks >>>> >>>> Paul >>>> --------------------------------------------------------------- >>>> >>>> mode(0) >>>> >>>> function status=test(i, t) >>>> printf("function %d is launched\n",i); >>>> sleep(t*1000); >>>> printf("function %d is endeed\n\n",i); >>>> status = 0; >>>> endfunction >>>> >>>> // the duration is expressed in second(s) >>>> status = test(1,1); >>>> status = test(2,3); >>>> status = test(3,5); >>>> status = test(4,7); >>>> >>>> ------------------------- >>>> >>>> DE: "Paul Carrico" >>>> ?: "International users mailing list for Scilab. >>>> (users at lists.scilab.org)" >>>> ENVOY?: Jeudi 20 Octobre 2016 15:41:18 >>>> OBJET: [Scilab-users] scilab and "parallelization" objectives >>>> >>>> Dear All, >>>> >>>> My internship had an interesting request and I?m not able to >>>> answer to him JJ >>>> >>>> The context is the following one: >>>> >>>> - We are using a parallel finite element solver on 4 >>>> PROCESSORS (under Linux), >>>> >>>> - We are performing optimization with an external >>>> optimizer, >>>> >>>> - Scilab has been interfaced with both the optimizer and >>>> the solver, >>>> >>>> - For the moment, the optimization loops are >>>> ?basically? performed using the parallelization capabilities of >>>> the solvers. >>>> >>>> In practice, Scilab ?runs? the solver and ?waits? the end of >>>> the simulation (always using 4 processors) before calculating the >>>> cost function value, giving the later value to the optimizer and >>>> then closing. >>>> >>>> IMAGINE THAT NOW we would like to run 4 DIFFERENT SIMULATIONS EACH >>>> ON 1 PROCESSOR in order to determine the gain (CPU time) ? how to >>>> proceed ? >>>> >>>> In practice Scilab must be able to : >>>> >>>> - Launch 1rst calculation and to handback ? >>>> >>>> - ? to launch the 2nd one ? and so on >>>> >>>> We can imagine creating a function per calculation (and I prefer in >>>> order to mix stuffs), then running independently but at the same >>>> time the different functions. >>>> >>>> Honestly I?ve never done this before and I?m wondering how to >>>> proceed ? or if it is possible : any feedback on it ? >>>> >>>> Thanks and regards >>>> >>>> Paul >>>> >>>> EXPORT CONTROL : >>>> Cet email ne contient pas de donn?es techniques >>>> This email does not contain technical data >>>> >>>> _______________________________________________ >>>> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Sun Oct 23 17:00:08 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Sun, 23 Oct 2016 17:00:08 +0200 Subject: [Scilab-users] C_Block and C_Fortran don't work on Scilab5.5.2 x64 windows 7 Message-ID: <000b01d22d3e$25f9b5f0$71ed21d0$@wanadoo.fr> Dear Scilab Team, After having correctly install gcc via MinGW on a PC Windows 7 x64, it's impossible to drap and drop a C_Bock (or Fortran_Block) and get a correct compilation. The linker refuses to operate due to the presence of the option -Wl in the batch file MakeLib It means that I am not able to create toolboxes in C langage, and can't continue my project until this issue will be solved. The object file .o seems to be correctly build. See also Bugzilla #14816 for attached files Errors : !------------- Compile file essai.c -------------- ! ! ! !x86_64-w64-mingw32-gcc.exe -c -DWIN32 -D_MSC_VER -DSTRICT -DFORDLL -I"C:/PROGRA~1/scilab/libs/MAL! ! LOC/includes" -I"C:/PROGRA~1/scilab/modules/core/includes" -I"C:/PROGRA~1/scilab/modules/api! ! _scilab/includes" -I"C:/PROGRA~1/scilab/modules/call_scilab/includes" -I"C:/PROGRA~1/scilab/! ! modules/output_stream/includes" -I"C:/PROGRA~1/scilab/modules/jvm/includes" -I"C:/PROGRA~1/s! ! cilab/modules/localization/includes" -I"C:/PROGRA~1/scilab/modules/dynamic_link/includes" -I! ! "C:/PROGRA~1/scilab/modules/mexlib/includes" -I"C:/PROGRA~1/scilab/modules/time/includes" -I! ! "C:/PROGRA~1/scilab/modules/windows_tools/includes" -I"C:/PROGRA~1/scilab/libs/f2c" -I"C:/PR! ! OGRA~1/scilab/libs/hashtable" -I"C:/PROGRA~1/scilab/libs/intl" -m64 -I"C:/PROGRA~1/scilab/m! ! odules/scicos/includes" -I"C:/PROGRA~1/scilab/modules/scicos_blocks/includes" essai.c ! ! ! !------------- Link files -------------- ! ! ! !x86_64-w64-mingw32-gcc.exe --shared essai.o -L"C:\Users\pierre\gcc\x86_64-w64-mingw32\lib" -LC:\! ! Users\pierre\AppData\Roaming\Scilab\scilab-5.5.2\mingwlib_x64 -lstdc++ -lgfortran -lMALLOC -! ! lblasplus -lf2c -llapack -lcore -lcore_f -lintersci -loutput_stream -ldynamic_link -linteger! ! -loptimization_f -ljvm -lscilocalization -lintl -llinpack_f -lcall_scilab -ltime -lapi_scil! ! ab -lscilab_windows -lscicos -lscicos_blocks -lscicos_blocks_f -lscicos_f -o libessai.dll -! ! Wl,--out-implib=libessai.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl "C:\Users\p! ! ierre\AppData\Roaming\Scilab\scilab-5.5.2\mingwlib_x64\libscicos.a" "C:\Users\pierre\AppData! ! \Roaming\Scilab\scilab-5.5.2\mingwlib_x64\libscicos_f.a" "C:\Users\pierre\AppData\Roaming\Sc! ! ilab\scilab-5.5.2\mingwlib_x64\libscicos_blocks.a" "C:\Users\pierre\AppData\Roaming\Scilab\s! ! cilab-5.5.2\mingwlib_x64\libscicos_blocks_f.a" ! ! ! !x86_64-w64-mingw32-gcc.exe: error: unrecognized command line option '-Wl' ! ! ! !make: *** [libessai.dll] Error 1 ! !sorry compiling problem ! ! ! !ilib_compile : Erreur ? l'ex?cution de Makelib. ! 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: From perrichon.pierre at wanadoo.fr Sun Oct 23 17:20:42 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Sun, 23 Oct 2016 17:20:42 +0200 Subject: [Scilab-users] MinGW doesn't run with Scilab 5.5.2 x64 W10 Message-ID: <002001d22d41$05341830$0f9c4890$@wanadoo.fr> After having install succesfully gcc on a pc windows 7 with scilab 5.5.2 x64, a temporary way to by-pass this bug is to copy the ?ain files .a in the ...Appdata\Roaming\Scilab-5.5.2\mingwlib_x64 But it doesn't solve the bug. It means files : libblasplus.a liblapack.a libMALLOC.a libf2c.a liblapack.a libcore.a libcore_f.a libintersci.a liboutput_stream.a libdynamic_link.a libinteger.a liboptimization_f.a libjvm.a libscilocalization.a libintl.a liblinpack_f.a libcall_scilab.a libtime.a libapi_scilab.a libscilab_windows.a libscicos.a libscicos_f.a libscicos_blocks.a libscicos_blocks_f.a Sincerely Pierre De : Perrichon [mailto:perrichon.pierre at wanadoo.fr] Envoy? : mercredi 19 octobre 2016 19:53 ? : 'Users mailing list for Scilab' Objet : RE: MinGW doesn't run with Scilab 5.5.2 x64 W10 PS : Following a run scilab wih the error above, if I try now to access to the Applications==>Gestionnaire de modules Atoms, I get hundred of error messages: Attention : La fonction load(file_descriptor) est obsol?te. Attention : Voir help('load') pour en savoir plus. Attention : Cette fonction sera d?finitivement supprim?e dans Scilab 6.0.0 Attention : La fonction load(file_descriptor) est obsol?te. Attention : Voir help('load') pour en savoir plus. Attention : Cette fonction sera d?finitivement supprim?e dans Scilab 6.0.0 See "Photo of the bug" in attached file De : Perrichon [mailto:perrichon.pierre at wanadoo.fr] Envoy? : mercredi 19 octobre 2016 19:14 ? : 'Users mailing list for Scilab' > Objet : WinGW doesn't run with Scilab 5.5.2 x64 W10 Dear all, I meet a system error when loading Scilab 5.5.2 x64 on a windows 10 machine. When I start Scilab, I get the error: Initialisation : Chargement de l'environnement de travail Mingw Compiler support for Scilab Load macros Warning !!! Scilab has found a critical error (EXCEPTION_ACCESS_VIOLATION) with "stacksize" function. Save your data and restart Scilab. Converting Libraries. Build libblasplus.a atomsLoad : Une erreur est survenue au cours du chargement de 'mingw-0.9.3': dos : Erreur d'allocation m?moire. See also bugzilla #14813 What can I do ? Thanks for your help 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: From perrichon.pierre at wanadoo.fr Sun Oct 23 18:43:33 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Sun, 23 Oct 2016 18:43:33 +0200 Subject: [Scilab-users] Impossibiity to run xcos with scilab-master-1477061911_x64 on windows 10 x64 Message-ID: <000901d22d4c$9827df40$c8779dc0$@wanadoo.fr> Dear scilab team. It's not possible to run the nighhtly build scilab-master-1477061911_x64 on windows 10 x64 Xcos command kills the main gui. Sincerely Pierre See also bugzilla #14817 -------------- 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: 33610 bytes Desc: not available URL: From rouxph.22 at gmail.com Tue Oct 25 15:19:17 2016 From: rouxph.22 at gmail.com (philippe) Date: Tue, 25 Oct 2016 15:19:17 +0200 Subject: [Scilab-users] problems installing SIVP from atoms Message-ID: Hi, I've reinstalled linux (ubuntu 16.04.1) on my desktop and then try to install SIVP from atoms. When I restart scilab I get an error message: SIVP - Scilab Image and Video Processing Toolbox Load macros Load gateways atomsLoad : Une erreur est survenue au cours du chargement de 'SIVP-0.5.3.2': link : La biblioth?que partag?e n'a pas ?t? charg?e: /home/roux/.Scilab/scilab-5.5.2/atoms/SIVP/0.5.3.2/sci_gateway/c//../../thirdparty/opencv/linux/x64/libavformat.so: fichier trop court I know that sometimes I have to add some libraries (.so files) to linux configuration but this time I don't find it ? opencv is already installed on my desktop and it seems that there is a lot of libavformat files : $ locate libavformat /usr/lib/x86_64-linux-gnu/libavformat-ffmpeg.so.56 /usr/lib/x86_64-linux-gnu/libavformat-ffmpeg.so.56.40.101 /usr/share/doc/libavformat-ffmpeg56 /usr/share/doc/libavformat-ffmpeg56/changelog.Debian.gz /usr/share/doc/libavformat-ffmpeg56/copyright /usr/share/lintian/overrides/libavformat-ffmpeg56 /var/cache/apt/archives/libavformat-ffmpeg56_7%3a2.8.8-0ubuntu0.16.04.1_amd64.deb /var/lib/dpkg/info/libavformat-ffmpeg56:amd64.list /var/lib/dpkg/info/libavformat-ffmpeg56:amd64.md5sums /var/lib/dpkg/info/libavformat-ffmpeg56:amd64.shlibs /var/lib/dpkg/info/libavformat-ffmpeg56:amd64.symbols /var/lib/dpkg/info/libavformat-ffmpeg56:amd64.triggers Philippe From sgougeon at free.fr Wed Oct 26 16:07:06 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Wed, 26 Oct 2016 16:07:06 +0200 Subject: [Scilab-users] Unpublished valid messages Message-ID: <5810B88A.6080705@free.fr> Hello, Some valid messages sent to this mailing list look to be blocked somewhere and are never actually sent to final recipients, despite they appear in the web archives. Examples, only for this list and for the last elapsed month: http://mailinglists.scilab.org/getting-the-first-column-of-function-tt4034849.html http://mailinglists.scilab.org/horner-test-tt4034828.html (in french, so badly addressed, anyway should have been received) http://mailinglists.scilab.org/Adding-toolbox-SIP-tt4034768.html http://mailinglists.scilab.org/Customizing-the-editor-e-g-font-size-background-color-tt4034697.html http://mailinglists.scilab.org/xls-link-gateways-not-loaded-in-english-tt4034599.html Filtering out spam is OK, but these messages are not spam. It's a pity to not receive them. Do we know why they are blocked? The flux on the list is not so high. More information explaining this would be welcome. Best regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: igcjceia.png Type: image/png Size: 10979 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Wed Oct 26 16:47:21 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Wed, 26 Oct 2016 14:47:21 +0000 Subject: [Scilab-users] Unpublished valid messages In-Reply-To: <5810B88A.6080705@free.fr> References: <5810B88A.6080705@free.fr> Message-ID: Hello, The messages larger than 100kb are also parked somewhere, waiting for the ML administrator?s verdict that seems to never come. Is there one ML administrator? Rgds, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Wednesday, October 26, 2016 4:07 PM To: International users mailing list for Scilab. Subject: [Scilab-users] Unpublished valid messages Hello, Some valid messages sent to this mailing list look to be blocked somewhere and are never actually sent to final recipients, despite they appear in the web archives. Examples, only for this list and for the last elapsed month: http://mailinglists.scilab.org/getting-the-first-column-of-function-tt4034849.html [cid:image002.jpg at 01D22FA7.75715050] http://mailinglists.scilab.org/horner-test-tt4034828.html (in french, so badly addressed, anyway should have been received) http://mailinglists.scilab.org/Adding-toolbox-SIP-tt4034768.html http://mailinglists.scilab.org/Customizing-the-editor-e-g-font-size-background-color-tt4034697.html http://mailinglists.scilab.org/xls-link-gateways-not-loaded-in-english-tt4034599.html Filtering out spam is OK, but these messages are not spam. It's a pity to not receive them. Do we know why they are blocked? The flux on the list is not so high. More information explaining this would be welcome. Best regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.jpg Type: image/jpeg Size: 14151 bytes Desc: image002.jpg URL: From fujimoto2005 at gmail.com Thu Oct 27 02:09:49 2016 From: fujimoto2005 at gmail.com (fujimoto2005) Date: Wed, 26 Oct 2016 17:09:49 -0700 (MST) Subject: [Scilab-users] ">" operation error in a some case Message-ID: <1477526989586-4034864.post@n3.nabble.com> I am using the scilab 6.0 beta 2. Please load the attached file 'val.dat' which contains two variable x and y. Operation 'x>y' returns the error message 'Undefined operation for the given operands. check or define function %s_2_s for overloading.' I don't know what is the cause and want to fix this error. I got actual values of x and y in a bisect code to find the solution of some equation and I can't go forward by this error. Please teach me how to fix it. Best regards. -- View this message in context: http://mailinglists.scilab.org/operation-error-in-a-some-case-tp4034864.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From n.gulunay at gmail.com Thu Oct 27 05:01:26 2016 From: n.gulunay at gmail.com (Necati Gulunay) Date: Wed, 26 Oct 2016 22:01:26 -0500 Subject: [Scilab-users] grayplot Message-ID: I am trying to use scilab grayplot to plot a number of signed values which are distributed in the x,y plane. But I am getting an orange color backround in the plot even if most of the data points in the plane are zero which need to be white color according to the color map I designed. Could anyone please tell me what the proble may be. I am attaching the script file which contains data points and the code. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: colortest.sce Type: application/octet-stream Size: 1782 bytes Desc: not available URL: From p.muehlmann at gmail.com Thu Oct 27 08:45:03 2016 From: p.muehlmann at gmail.com (=?UTF-8?Q?Philipp_M=C3=BChlmann?=) Date: Thu, 27 Oct 2016 08:45:03 +0200 Subject: [Scilab-users] grayplot In-Reply-To: References: Message-ID: well , your colormap is "jetcolormap"; change that in line 119 and 125 to "graycolormap" and you get a gray plot. In fact I think it is enough to define the colormap juts once. best regards 2016-10-27 5:01 GMT+02:00 Necati Gulunay : > I am trying to use scilab grayplot to plot a number of signed values which > are distributed in the x,y plane. > > But I am getting an orange color backround in the plot even if most of the > data points in the plane are zero which need to be white color according to > the color map I designed. > > Could anyone please tell me what the proble may be. I am attaching the > script file which contains data points and the code. > > _______________________________________________ > 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 sgougeon at free.fr Thu Oct 27 09:57:57 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 27 Oct 2016 09:57:57 +0200 Subject: [Scilab-users] ">" operation error in a some case In-Reply-To: <1477526989586-4034864.post@n3.nabble.com> References: <1477526989586-4034864.post@n3.nabble.com> Message-ID: <5811B385.1020200@free.fr> Hello Le 27/10/2016 02:09, fujimoto2005 a ?crit : > I am using the scilab 6.0 beta 2. > Please load the attached file 'val.dat' which contains two variable x and y. > Operation 'x>y' returns the error message 'Undefined operation for the given > operands. > check or define function %s_2_s for overloading.' > I don't know what is the cause and want to fix this error. . It is very likely due to the fact that one or both operands are complex-encoded. You may check that with isreal(x) & isreal(y). HTH Samuel From n.gulunay at gmail.com Thu Oct 27 11:38:45 2016 From: n.gulunay at gmail.com (nec) Date: Thu, 27 Oct 2016 02:38:45 -0700 (MST) Subject: [Scilab-users] grayplot In-Reply-To: References: Message-ID: <1477561125526-4034868.post@n3.nabble.com> Thank you Philippe, but I need color plots , not a gray one. I was using grayplot because it as well as Sgrayplot worked for me for color plots. I just can get rid of the orange color where it is not supposed to be. it is biasing everything. -- View this message in context: http://mailinglists.scilab.org/Scilab-users-grayplot-tp4034865p4034868.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Thu Oct 27 15:28:15 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 27 Oct 2016 15:28:15 +0200 Subject: [Scilab-users] grayplot In-Reply-To: <1477561125526-4034868.post@n3.nabble.com> References: <1477561125526-4034868.post@n3.nabble.com> Message-ID: <581200EF.6050509@free.fr> Le 27/10/2016 11:38, nec a ?crit : > Thank you Philippe, but I need color plots , not a gray one. I was using > grayplot because it as well as Sgrayplot worked for me for color plots. I > just can get rid of the orange color where it is not supposed to be. it is > biasing everything. The ..grayplot() family sets the color index of a rectangle as the /average/ Z value of its vertices. This is likely why you get this "bias". To get rectangular cells colored with the given color indices without averaging them, you may use Matplot() or Matplot1() instead. HTH Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From jrafaelbguerra at hotmail.com Thu Oct 27 16:19:07 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 27 Oct 2016 14:19:07 +0000 Subject: [Scilab-users] grayplot In-Reply-To: References: Message-ID: Hi, Please try the tidied up code below which uses Sgrayplot instead. /////// START OF CODE clf(); clear; x=[8030 8040 7998 8008 8037 7956 7937 7963 7919 7920]; y=[9478 9533 9578 9590 9597 9626 9627 9723 9766 9768]; z=[-2.39965177 1.81709373 -1.14068067 -2.95249772 -3.25881290 1.36802530 -1.46287727 ... -6.40911865 1.03929353 1.49115121]; n=length(z); printf('length(x)=%i\n',length(x)); x1=min(x); x2=max(x); ilen=x2-x1+1; printf('ilen=%i\n',ilen); y1=min(y); y2=max(y); jlen=y2-y1+1; printf('jlen=%i\n',jlen); newmat= zeros(ilen,jlen); newmat(x-x1+1,y-y1+1)=diag(z); printf('size of newmat= %i x %i\n',size(newmat)); xaxis=1:ilen; yaxis=1:jlen; fig5=scf(5); dmin=min(newmat); dmax=max(newmat); dmax=max(abs(dmin),abs(dmax)); dmin=-dmax; xtitle("data") ncol = 64; colorbar(dmin,dmax,[1, ncol]); Sgrayplot(xaxis,yaxis,newmat,zminmax=[dmin,dmax]) h = gcf(); h.color_map = jetcolormap(ncol); h.color_map(int(ncol/2),1:3)=0; // color zeros with black=0; white=1 h.color_map(int(ncol/2+1),1:3)=0; // idem /////// END OF CODE Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Necati Gulunay Sent: Thursday, October 27, 2016 5:01 AM To: users at lists.scilab.org Subject: [Scilab-users] grayplot I am trying to use scilab grayplot to plot a number of signed values which are distributed in the x,y plane.? But I am getting an orange color backround in the plot even if most of the data points in the plane are zero which need to be white color according to the color map I designed. Could anyone please tell me what the proble may be. I am attaching the script file which contains data points and the code. From sgougeon at free.fr Thu Oct 27 16:47:49 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 27 Oct 2016 16:47:49 +0200 Subject: [Scilab-users] grayplot In-Reply-To: References: Message-ID: <58121395.1040001@free.fr> Le 27/10/2016 05:01, Necati Gulunay a ?crit : > I am trying to use scilab grayplot to plot a number of signed values > which are distributed in the x,y plane. > > But I am getting an orange color backround in the plot even if most of > the data points in the plane are zero which need to be white color > according to the color map I designed. > > Could anyone please tell me what the proble may be. I am attaching the > script file which contains data points and the code. . Since the points you want to "plot" seem to be sparse, you may prefer using xrects() instead of a gridded plot like with Matplot() or ..grayplot() From sgougeon at free.fr Thu Oct 27 16:52:03 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 27 Oct 2016 16:52:03 +0200 Subject: [Scilab-users] grayplot In-Reply-To: <58121395.1040001@free.fr> References: <58121395.1040001@free.fr> Message-ID: <58121493.4040606@free.fr> Le 27/10/2016 16:47, Samuel Gougeon a ?crit : > Le 27/10/2016 05:01, Necati Gulunay a ?crit : >> I am trying to use scilab grayplot to plot a number of signed values >> which are distributed in the x,y plane. >> >> But I am getting an orange color backround in the plot even if most >> of the data points in the plane are zero which need to be white color >> according to the color map I designed. >> >> Could anyone please tell me what the proble may be. I am attaching >> the script file which contains data points and the code. > . > Since the points you want to "plot" seem to be sparse, you may prefer > using xrects() instead of a gridded plot like with Matplot() or > ..grayplot() . scatter() is also dedicated to this kind of sparse plotting: https://help.scilab.org/docs/6.0.0/en_US/scatter.html From jrafaelbguerra at hotmail.com Thu Oct 27 18:50:58 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 27 Oct 2016 16:50:58 +0000 Subject: [Scilab-users] grayplot In-Reply-To: <58121493.4040606@free.fr> References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> Message-ID: Hi Samuel, Scilab-6 'scatter' plot function seems indeed quite adequate for these data. Would it be possible to produce such scatter plots with dots color coded (as attached) in Scilab 5? Thanks and regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Thursday, October 27, 2016 4:52 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] grayplot Le 27/10/2016 16:47, Samuel Gougeon a ?crit : > Le 27/10/2016 05:01, Necati Gulunay a ?crit : >> I am trying to use scilab grayplot to plot a number of signed values >> which are distributed in the x,y plane. >> >> But I am getting an orange color backround in the plot even if most >> of the data points in the plane are zero which need to be white color >> according to the color map I designed. >> >> Could anyone please tell me what the proble may be. I am attaching >> the script file which contains data points and the code. > . > Since the points you want to "plot" seem to be sparse, you may prefer > using xrects() instead of a gridded plot like with Matplot() or > ..grayplot() . scatter() is also dedicated to this kind of sparse plotting: https://help.scilab.org/docs/6.0.0/en_US/scatter.html -------------- next part -------------- A non-text attachment was scrubbed... Name: Scilab6_scatter_plot.gif Type: image/gif Size: 8206 bytes Desc: Scilab6_scatter_plot.gif URL: From sgougeon at free.fr Thu Oct 27 20:15:09 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 27 Oct 2016 20:15:09 +0200 Subject: [Scilab-users] grayplot In-Reply-To: References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> Message-ID: <5812442D.7090704@free.fr> Le 27/10/2016 18:50, Rafael Guerra a ?crit : > Hi Samuel, > > Scilab-6 'scatter' plot function seems indeed quite adequate for these data. > Would it be possible to produce such scatter plots with dots color coded (as attached) in Scilab 5? . yes it is, for instance using xfarcs() as below. Regards np = 40; // number of points x = grand(1,np, "unf", -20, 140); y = grand(1,np, "unf", -50, 300); dz = 6.4; z = grand(1,np, "unf", -dz, dz); clf f = gcf(); nc = 100; f.color_map = jetcolormap(nc); plotframe([-20 -50 140 300]) c = round((z+dz)/(2*dz)*(nc-1)+1); // colors of dots scaled against their z // shaping dots ar = f.axes_size; ar = ar(1)/ar(2); // w/h aspect ratio of figure dotsize_r = 0.04; // relative size of dots h = strange(y)*dotsize_r; w = strange(x)*dotsize_r/ar; dots = [x ; y ; ones(x)*w ; ones(x)*h ; zeros(x) ; ones(x)*64*360]; // plotting dots xfarcs(dots, c); // colorbar colorbar(-dz,dz) -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bdaefgij.png Type: image/png Size: 8775 bytes Desc: not available URL: From jrafaelbguerra at hotmail.com Thu Oct 27 20:23:15 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 27 Oct 2016 11:23:15 -0700 (MST) Subject: [Scilab-users] horner test In-Reply-To: <1476632121465-4034828.post@n3.nabble.com> References: <1476632121465-4034828.post@n3.nabble.com> Message-ID: <1477592595938-4034875.post@n3.nabble.com> (note: votre message n'a pas ?t? publi?) Bonsoir, Essayez le code suivant svp: // START OF CODE clear; clf; M = [ 0.003 170000 0.0028 208980 0.0026 261261 0.0024 336000 0.0022 439530 0.002 570000 0.0018 785568 0.0016 1110375 0.0014 1667952 0.0012 2646000 0.001 4500000 0.0008 8812500 0.0006 20875000 0.0004 70500000 ]; x = M(:,1); y = M(:,2); function f = fmodel(a,x) f = exp(a(1) + a(2)*x + a(3)*x.^a(4)); endfunction function f = costfun(a,x,y) f = norm(y - fmodel(a,x)); endfunction a0 = [0;0;0;0]; [f,aop]= optim(list(NDcost,costfun,x,y),a0); str = sprintf("Scilab''s optim result: y = %.4f*exp(%.2f*x %+.2f*x^%+.2f)\n",exp(aop(1)),aop(2),aop(3),aop(4)); plot(x,y,"*r",x, fmodel(aop,x),"blue") h = gca(); h.title.text= str; h.title.font_size = 4; xgrid printf("\nEquation to model data: y = a1*exp(a2*x + a3*x^a4)\n") printf("%s\n",str) printf("Cost function value = %g",f) // NOTE: the cost function value can be further reduced by fixing a(4)=-0.021; // and inverting for only 3 parameters: a(1), a(2) and a(3) // END OF CODE Cordialement, Rafael -- View this message in context: http://mailinglists.scilab.org/horner-test-tp4034828p4034875.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From n.gulunay at gmail.com Thu Oct 27 20:26:55 2016 From: n.gulunay at gmail.com (nec) Date: Thu, 27 Oct 2016 11:26:55 -0700 (MST) Subject: [Scilab-users] grayplot In-Reply-To: References: Message-ID: <1477592815998-4034876.post@n3.nabble.com> Dear Rafael and Dear Samuel Thank you both for you help. I got the white background by changing the black flag (0 ) to white (1) . Rafael's code indeed teaches me a couple other things that I did not know. Nec -- View this message in context: http://mailinglists.scilab.org/Scilab-users-grayplot-tp4034865p4034876.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Thu Oct 27 20:31:48 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 27 Oct 2016 18:31:48 +0000 Subject: [Scilab-users] grayplot In-Reply-To: <5812442D.7090704@free.fr> References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> Message-ID: Hi Samuel, It looks brilliant J Thanks and regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Thursday, October 27, 2016 8:15 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] grayplot Le 27/10/2016 18:50, Rafael Guerra a ?crit : Hi Samuel, Scilab-6 'scatter' plot function seems indeed quite adequate for these data. Would it be possible to produce such scatter plots with dots color coded (as attached) in Scilab 5? . yes it is, for instance using xfarcs() as below. Regards np = 40; // number of points x = grand(1,np, "unf", -20, 140); y = grand(1,np, "unf", -50, 300); dz = 6.4; z = grand(1,np, "unf", -dz, dz); clf f = gcf(); nc = 100; f.color_map = jetcolormap(nc); plotframe([-20 -50 140 300]) c = round((z+dz)/(2*dz)*(nc-1)+1); // colors of dots scaled against their z // shaping dots ar = f.axes_size; ar = ar(1)/ar(2); // w/h aspect ratio of figure dotsize_r = 0.04; // relative size of dots h = strange(y)*dotsize_r; w = strange(x)*dotsize_r/ar; dots = [x ; y ; ones(x)*w ; ones(x)*h ; zeros(x) ; ones(x)*64*360]; // plotting dots xfarcs(dots, c); // colorbar colorbar(-dz,dz) [cid:image001.png at 01D23091.20767130] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 8775 bytes Desc: image001.png URL: From sgougeon at free.fr Thu Oct 27 20:33:59 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 27 Oct 2016 20:33:59 +0200 Subject: [Scilab-users] grayplot In-Reply-To: <5812442D.7090704@free.fr> References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> Message-ID: <58124897.5090508@free.fr> Le 27/10/2016 20:15, Samuel Gougeon a ?crit : > .../... > np = 40; // number of points > x = grand(1,np, "unf", -20, 140); > y = grand(1,np, "unf", -50, 300); > dz = 6.4; > z = grand(1,np, "unf", -dz, dz); > > clf > f = gcf(); > nc = 100; > f.color_map = jetcolormap(nc); > plotframe([-20 -50 140 300]) . after fixing it as commited here: https://codereview.scilab.org/#/c/18641/1/scilab/modules/graphics/macros/plotframe.sci -------------- next part -------------- An HTML attachment was scrubbed... URL: From rouxph.22 at gmail.com Thu Oct 27 21:43:43 2016 From: rouxph.22 at gmail.com (philippe) Date: Thu, 27 Oct 2016 21:43:43 +0200 Subject: [Scilab-users] ">" operation error in a some case In-Reply-To: <5811B385.1020200@free.fr> References: <1477526989586-4034864.post@n3.nabble.com> <5811B385.1020200@free.fr> Message-ID: Hi to all, Le 27/10/2016 ? 09:57, Samuel Gougeon a ?crit : > > It is very likely due to the fact that one or both operands are > complex-encoded. > You may check that with isreal(x) & isreal(y). I've being fighting for a long time with this problem. Most of the time, the variable x will contain complex value due to rounding errors, so it's hard to identify the problem !!! The error message is unclear because it suggest that ">" (operator n? 2) is undefined for "constant" variable (type "s") although 1>0 works fine ... I think it will be better that "x>y" returns the result of "real(x)>real(y)" to avoid rounding problems . Philippe From jrafaelbguerra at hotmail.com Thu Oct 27 21:56:55 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 27 Oct 2016 19:56:55 +0000 Subject: [Scilab-users] grayplot In-Reply-To: <5812442D.7090704@free.fr> References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> Message-ID: Hi again, After tidying up Nec's code a bit further and applying Samuel's xfarcs receipe for colored scatter plots in Scilab 5x, I encountered the following strange behavior. For some reason, in the code here below, xfarcs has to be called twice in order to display properly all the data... /////// START OF CODE clf(); clear; x=[8030 8040 7998 8008 8037 7956 7937 7963 7919 7920]; y=[9478 9533 9578 9590 9597 9626 9627 9723 9766 9768]; z=[-2.39965177 1.81709373 -1.14068067 -2.95249772 -3.25881290 1.36802530 -1.46287727 ... -6.40911865 1.03929353 1.49115121]; xm = min(x); xM = min(x); dx = strange(x); ym = min(y); yM = min(y); dy = strange(y); zm = min(z); zM = max(z); xtitle("Color coded scatter data under Scilab 5x") mg = 0.05; // plot area relative margin nc = 64; // number of colors rect = [xm,ym,xM,yM]+mg*[-dx,-dy,dx,dy]; // plotframe(rect) // currently is issuing error message plot2d(x,y,rect) xgrid(); p = get("hdl"); p.children.line_mode="off"; f = gcf(); f.color_map = jetcolormap(nc); colorbar(zm,zM); // shaping dots (by S.Gougeon) ar = f.axes_size; ar = ar(1)/ar(2); // w/h aspect ratio of figure dotsize_r = 0.04; // relative size of dots h = dy*dotsize_r; w = dx*dotsize_r/ar; dots = [x-w/2; y+h/2; ones(x)*w; ones(x)*h; zeros(x); ones(x)*64*360]; c = round(1+(z-zm)*(nc-1)/(zM-zm)); // dots colors scaled against z-value xfarcs(dots, c); // plotting dots (the first time does not work well!?) xfarcs(dots, c); // second time seems to be Ok... /////// END OF CODE Why? Rgds, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Thursday, October 27, 2016 8:15 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] grayplot Le 27/10/2016 18:50, Rafael Guerra a ?crit?: Hi Samuel, Scilab-6 'scatter' plot function seems indeed quite adequate for these data. Would it be possible to produce such scatter plots with dots color coded (as attached) in Scilab 5? . yes it is, for instance using xfarcs() as below. Regards np = 40; // number of points x = grand(1,np, "unf", -20, 140); y = grand(1,np, "unf", -50, 300); dz = 6.4; z = grand(1,np, "unf", -dz, dz); clf f = gcf(); nc = 100; f.color_map = jetcolormap(nc); plotframe([-20 -50 140 300]) c = round((z+dz)/(2*dz)*(nc-1)+1); // colors of dots scaled against their z // shaping dots ar = f.axes_size; ar = ar(1)/ar(2); // w/h aspect ratio of figure dotsize_r = 0.04; // relative size of dots h = strange(y)*dotsize_r; w = strange(x)*dotsize_r/ar; dots = [x ; y ; ones(x)*w ; ones(x)*h ; zeros(x) ; ones(x)*64*360]; // plotting dots xfarcs(dots, c); // colorbar colorbar(-dz,dz) From sgougeon at free.fr Fri Oct 28 00:59:07 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 28 Oct 2016 00:59:07 +0200 Subject: [Scilab-users] ">" operation error in a some case In-Reply-To: References: <1477526989586-4034864.post@n3.nabble.com> <5811B385.1020200@free.fr> Message-ID: <581286BB.8020809@free.fr> Hello Philippe, Le 27/10/2016 21:43, philippe a ?crit : > Hi to all, > > Le 27/10/2016 ? 09:57, Samuel Gougeon a ?crit : > > > > It is very likely due to the fact that one or both operands are > > complex-encoded. > > You may check that with isreal(x) & isreal(y). > > I've being fighting for a long time with this problem. Most of the > time, the variable x will contain complex value due to rounding > errors, so it's hard to identify the problem !!! > > The error message is unclear because it suggest that ">" (operator n? > 2) is undefined for "constant" variable (type "s") although 1>0 > works fine ... I think it will be better that "x>y" returns the result > of "real(x)>real(y)" to avoid rounding problems . . IMO, instead of being undefined, default overloaded inequalities between constants should be defined and display an explicit error message telling that they are not defined for complex-encoded operands. BR Samuel From sgougeon at free.fr Fri Oct 28 01:34:53 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 28 Oct 2016 01:34:53 +0200 Subject: [Scilab-users] grayplot In-Reply-To: References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> Message-ID: <58128F1D.7050003@free.fr> Le 27/10/2016 21:56, Rafael Guerra a ?crit : > Hi again, > > After tidying up Nec's code a bit further and applying Samuel's xfarcs receipe for colored scatter plots in Scilab 5x, I encountered the following strange behavior. For some reason, in the code here below, xfarcs has to be called twice in order to display properly all the data... . colorbar(..) creates a new axes. So if you move xfarcs() after colorbar()... Just set the colorbar() at the end. Then it's ok. BTW, // plotframe(rect) // currently is issuing error message plot2d(x,y,rect) xgrid(); p = get("hdl"); p.children.line_mode="off"; // may be replace with plot2d([],[],rect=rect, axesflag=1) // a better grid style: xgrid(color("grey70")) a = gca(); a.grid_style=[8 8]; // IMO this grid style could become the default. Full black is too saturated, and the better linestyle=8 was created quite recently. So the default grid style would deserve being upgraded. Your opinion? BR From jrafaelbguerra at hotmail.com Fri Oct 28 02:54:53 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 28 Oct 2016 00:54:53 +0000 Subject: [Scilab-users] grayplot In-Reply-To: <58128F1D.7050003@free.fr> References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> <58128F1D.7050003@free.fr> Message-ID: Samuel, The proposed grid looks much better than Scilab's default. Regarding the tip to move the colorbar command to the end of the code, code still behaves in unstable way... Please see revised code here below where the issue strikes back: /////// START OF CODE clf(); clear; x=[8030 8040 7998 8008 8037 7956 7937 7963 7919 7920]; y=[9478 9533 9578 9590 9597 9626 9627 9723 9766 9768]; z=[-2.39965177 1.81709373 -1.14068067 -2.95249772 -3.25881290 1.36802530 -1.46287727 ... -6.40911865 1.03929353 1.49115121]; xm = min(x); xM = min(x); dx = strange(x); ym = min(y); yM = min(y); dy = strange(y); zm = min(z); zM = max(z); xtitle("Color coded scatter data under Scilab 5x") mg = 0.05; // plot area relative margin nc = 64; // number of colors rect = [xm,ym,xM,yM]+mg*[-dx,-dy,dx,dy]; // plotframe(rect) // currently is issuing error message plot2d([],[],rect=rect, axesflag=1) f = gcf(); f.color_map = jetcolormap(nc); addcolor(name2rgb('grey70')/255); xgrid(65); // a better grid style: a = gca(); a.grid_style=[8 8]; // shaping dots (by S.Gougeon) ar = f.axes_size; ar = ar(1)/ar(2); // w/h aspect ratio of figure dotsize_r = 0.04; // relative size of dots h = dy*dotsize_r; w = dx*dotsize_r/ar; dots = [x-w/2; y+h/2; ones(x)*w; ones(x)*h; zeros(x); ones(x)*64*360]; c = round(1+(z-zm)*(nc-1)/(zM-zm)); // dots colors scaled against z-value xfarcs(dots, c); // first xfarcs is not enough xfarcs(dots, c); // Need to repeat it to plot all data... colorbar(zm,zM); /////// END OF CODE Rgds, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Friday, October 28, 2016 1:35 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] grayplot Le 27/10/2016 21:56, Rafael Guerra a ?crit : > Hi again, > > After tidying up Nec's code a bit further and applying Samuel's xfarcs receipe for colored scatter plots in Scilab 5x, I encountered the following strange behavior. For some reason, in the code here below, xfarcs has to be called twice in order to display properly all the data... . colorbar(..) creates a new axes. So if you move xfarcs() after colorbar()... Just set the colorbar() at the end. Then it's ok. BTW, // plotframe(rect) // currently is issuing error message plot2d(x,y,rect) xgrid(); p = get("hdl"); p.children.line_mode="off"; // may be replace with plot2d([],[],rect=rect, axesflag=1) // a better grid style: xgrid(color("grey70")) a = gca(); a.grid_style=[8 8]; // IMO this grid style could become the default. Full black is too saturated, and the better linestyle=8 was created quite recently. So the default grid style would deserve being upgraded. Your opinion? BR From sgougeon at free.fr Fri Oct 28 03:15:54 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 28 Oct 2016 03:15:54 +0200 Subject: [Scilab-users] grayplot In-Reply-To: References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> <58128F1D.7050003@free.fr> Message-ID: <5812A6CA.2080304@free.fr> Le 28/10/2016 02:54, Rafael Guerra a ?crit : > Samuel, > > The proposed grid looks much better than Scilab's default. > > Regarding the tip to move the colorbar command to the end of the code, code still behaves in unstable way... > Please see revised code here below where the issue strikes back: . With the grid between xfarcs() and the colorbar(), it works. BTW, wherever a new color is used, it is automatically appended to the colormap: no need to append it by hand: > /////// START OF CODE > clf(); > x=[8030 8040 7998 8008 8037 7956 7937 7963 7919 7920]; > y=[9478 9533 9578 9590 9597 9626 9627 9723 9766 9768]; > z=[-2.39965177 1.81709373 -1.14068067 -2.95249772 -3.25881290 1.36802530 -1.46287727 ... > -6.40911865 1.03929353 1.49115121]; > > xm = min(x); xM = min(x); dx = strange(x); > ym = min(y); yM = min(y); dy = strange(y); > zm = min(z); zM = max(z); > > xtitle("Color coded scatter data under Scilab 5x") > mg = 0.05; // plot area relative margin > nc = 64; // number of colors > rect = [xm,ym,xM,yM] + mg*[-dx,-dy,dx,dy]; > // plotframe(rect) // currently is issuing error message > plot2d([],[],rect=rect, axesflag=1) > f = gcf(); > f.color_map = jetcolormap(nc); > > // shaping dots (by S.Gougeon) > ar = f.axes_size; ar = ar(1)/ar(2); // w/h aspect ratio of figure > dotsize_r = 0.04; // relative size of dots > h = dy*dotsize_r; > w = dx*dotsize_r/ar; > dots = [x-w/2; y+h/2; ones(x)*w; ones(x)*h; zeros(x); ones(x)*64*360]; > c = round(1+(z-zm)*(nc-1)/(zM-zm)); // dots colors scaled against z-value > xfarcs(dots, c); > > xgrid(color("grey70")); // a better grid style: > a = gca(); > a.grid_style=[8 8]; > > colorbar(zm,zM,[1 nc]); > /////// END OF CODE > From sgougeon at free.fr Fri Oct 28 03:18:58 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 28 Oct 2016 03:18:58 +0200 Subject: [Scilab-users] grayplot In-Reply-To: <5812A6CA.2080304@free.fr> References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> <58128F1D.7050003@free.fr> <5812A6CA.2080304@free.fr> Message-ID: <5812A782.9070905@free.fr> Le 28/10/2016 03:15, Samuel Gougeon a ?crit : > Le 28/10/2016 02:54, Rafael Guerra a ?crit : >> Samuel, >> >> The proposed grid looks much better than Scilab's default. >> >> Regarding the tip to move the colorbar command to the end of the >> code, code still behaves in unstable way... >> Please see revised code here below where the issue strikes back: > . > With the grid between xfarcs() and the colorbar(), it works. > BTW, wherever a new color is used, it is automatically appended to the > colormap: no need to append it by hand: . To be more accurate: color(..) automatically appends any given undefined color to the colormap, or directly uses the defined one otherwise. From Christophe.Dang at sidel.com Fri Oct 28 10:03:41 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Fri, 28 Oct 2016 08:03:41 +0000 Subject: [Scilab-users] {EXT} Re: horner test In-Reply-To: <1477592595938-4034875.post@n3.nabble.com> References: <1476632121465-4034828.post@n3.nabble.com> <1477592595938-4034875.post@n3.nabble.com> Message-ID: Hello, > De : users [mailto:users-bounces at lists.scilab.org] De la part de Rafael Guerra > Envoy? : jeudi 27 octobre 2016 20:23 > > (note: votre message n'a pas ?t? publi?) > [?] > function f = fmodel(a,x) > f = exp(a(1) + a(2)*x + a(3)*x.^a(4)); > endfunction > > function f = costfun(a,x,y) > f = norm(y - fmodel(a,x)); > endfunction > > a0 = [0;0;0;0]; > [f,aop]= optim(list(NDcost,costfun,x,y),a0); As I didn't know why the message was not published, I answered directly to the sender (hope he/she got it). I personally recommended to first look for a power function A = [log(x), ones(x)]\log(y) which gives a satisfactory result in itself. plot(x, exp(A(2))*x^A(1)); plot(x, y, "o"); Then we see that the power is close to -3, we can also try a 3rd degree 1/x polynomial invx = x.^-1; X = [invx.^3, invx.^2, invx, ones(x)]; B = X\y; plot(x, X*B); plot(x, y, "o"); All this is less straightforward and automatized as your method, but maybe more stable (and faster ?) as it only uses linear regression. regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From jrafaelbguerra at hotmail.com Fri Oct 28 11:23:47 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 28 Oct 2016 09:23:47 +0000 Subject: [Scilab-users] {EXT} Re: horner test In-Reply-To: References: <1476632121465-4034828.post@n3.nabble.com> <1477592595938-4034875.post@n3.nabble.com> Message-ID: Hi Christophe, The linear regression method and functions that you propose below do fit the data much better than the optim solution. Thanks and regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Dang Ngoc Chan, Christophe Sent: Friday, October 28, 2016 10:04 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] {EXT} Re: horner test Hello, > De : users [mailto:users-bounces at lists.scilab.org] De la part de Rafael Guerra > Envoy? : jeudi 27 octobre 2016 20:23 > > (note: votre message n'a pas ?t? publi?) > [?] > function f = fmodel(a,x) > f = exp(a(1) + a(2)*x + a(3)*x.^a(4)); > endfunction > > function f = costfun(a,x,y) > f = norm(y - fmodel(a,x)); > endfunction > > a0 = [0;0;0;0]; > [f,aop]= optim(list(NDcost,costfun,x,y),a0); As I didn't know why the message was not published, I answered directly to the sender (hope he/she got it). I personally recommended to first look for a power function A = [log(x), ones(x)]\log(y) which gives a satisfactory result in itself. plot(x, exp(A(2))*x^A(1)); plot(x, y, "o"); Then we see that the power is close to -3, we can also try a 3rd degree 1/x polynomial invx = x.^-1; X = [invx.^3, invx.^2, invx, ones(x)]; B = X\y; plot(x, X*B); plot(x, y, "o"); All this is less straightforward and automatized as your method, but maybe more stable (and faster ?) as it only uses linear regression. regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From jrafaelbguerra at hotmail.com Fri Oct 28 13:06:18 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 28 Oct 2016 11:06:18 +0000 Subject: [Scilab-users] {EXT} Re: horner test In-Reply-To: References: <1476632121465-4034828.post@n3.nabble.com> <1477592595938-4034875.post@n3.nabble.com> Message-ID: Hi again Christophe, After revision and to be fair with 'optim', if one uses the same fitting function (to compare apples to apples), then optim finds accurately the solution but it is, indeed, much slower than linear regression: Method#0 (optim): time1= 0.015600 ; error= 0.027010 Method#1 (lin reg): time2= 0.000000 ; error= 0.027010 As per modified code here below: ////// START OF CODE clear; clf; M = [ 0.003 170000 0.0028 208980 0.0026 261261 0.0024 336000 0.0022 439530 0.002 570000 0.0018 785568 0.0016 1110375 0.0014 1667952 0.0012 2646000 0.001 4500000 0.0008 8812500 0.0006 20875000 0.0004 70500000 ]; x = M(:,1); y = M(:,2); function f = fmodel(a,x) f = a(1) + a(2)*log(x); endfunction function f = costfun(a,x,y) f = norm(y - fmodel(a,x)); endfunction timer(); // Method#1: optim a0 = [1;-1]; ly = log(y); [f,aop] = optim(list(NDcost,costfun,x,ly),a0); t1 = timer(); // Method#2: linear regression A = [log(x), ones(x)]\log(y); y2 = exp(A(2)).*x.^A(1); t2 = timer(); str = sprintf("Scilab''s optim result: y = %.4f*exp(%.3f*log(x))\n",exp(aop(1)),aop(2)); y1 = fmodel(aop,x); plot(x,y1,"blue",x,log(y2),"--c",x,ly,"*r") h = gca(); h.title.text= str; h.title.font_size = 4; xgrid printf("\nMethod#0 (optim): time1= %f ; error= %f",t1,norm(y1-ly)) printf("\nMethod#1 (lin reg): time2= %f ; error= %f",t2,norm(log(y2)-ly)) ////// END OF CODE Regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Rafael Guerra Sent: Friday, October 28, 2016 11:24 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] {EXT} Re: horner test Hi Christophe, The linear regression method and functions that you propose below do fit the data much better than the optim solution. Thanks and regards, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Dang Ngoc Chan, Christophe Sent: Friday, October 28, 2016 10:04 AM To: Users mailing list for Scilab Subject: Re: [Scilab-users] {EXT} Re: horner test Hello, > De : users [mailto:users-bounces at lists.scilab.org] De la part de Rafael Guerra > Envoy? : jeudi 27 octobre 2016 20:23 > > (note: votre message n'a pas ?t? publi?) > [?] > function f = fmodel(a,x) > f = exp(a(1) + a(2)*x + a(3)*x.^a(4)); > endfunction > > function f = costfun(a,x,y) > f = norm(y - fmodel(a,x)); > endfunction > > a0 = [0;0;0;0]; > [f,aop]= optim(list(NDcost,costfun,x,y),a0); As I didn't know why the message was not published, I answered directly to the sender (hope he/she got it). I personally recommended to first look for a power function A = [log(x), ones(x)]\log(y) which gives a satisfactory result in itself. plot(x, exp(A(2))*x^A(1)); plot(x, y, "o"); Then we see that the power is close to -3, we can also try a 3rd degree 1/x polynomial invx = x.^-1; X = [invx.^3, invx.^2, invx, ones(x)]; B = X\y; plot(x, X*B); plot(x, y, "o"); All this is less straightforward and automatized as your method, but maybe more stable (and faster ?) as it only uses linear regression. regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer From jrafaelbguerra at hotmail.com Fri Oct 28 14:12:21 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 28 Oct 2016 12:12:21 +0000 Subject: [Scilab-users] grayplot In-Reply-To: <5812A6CA.2080304@free.fr> References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> <58128F1D.7050003@free.fr> <5812A6CA.2080304@free.fr> Message-ID: Hi Samuel, Fyi, on my Scilab 5.5.2 (64-bit) Win 7 configuration, the code here below still fails for one xfarcs() call. Uncommenting the second xfarcs() call does fix the plot (attached). It looks like a bug. Or could it be only an issue with my configuration? /////// START OF CODE clf(); x=[8030 8040 7998 8008 8037 7956 7937 7963 7919 7920]; y=[9478 9533 9578 9590 9597 9626 9627 9723 9766 9768]; z=[-2.39965177 1.81709373 -1.14068067 -2.95249772 -3.25881290 1.36802530 -1.46287727 ... -6.40911865 1.03929353 1.49115121]; xm = min(x); xM = min(x); dx = strange(x); ym = min(y); yM = min(y); dy = strange(y); zm = min(z); zM = max(z); xtitle("Color coded scatter data under Scilab 5x") mg = 0.05; // plot area relative margin nc = 64; // number of colors rect0 = [xm,ym,xM,yM] + mg*[-dx,-dy,dx,dy]; //plotframe(rect) // currently is issuing error message plot2d([],[],rect=rect0, axesflag=1) f = gcf(); f.color_map = jetcolormap(nc); //shaping dots (by S.Gougeon) ar = f.axes_size; ar = ar(1)/ar(2); // w/h aspect ratio of figure dotsize_r = 0.04; // relative size of dots h = dy*dotsize_r; w = dx*dotsize_r/ar; dots = [x-w/2; y+h/2; ones(x)*w; ones(x)*h; zeros(x); ones(x)*64*360]; c = round(1+(z-zm)*(nc-1)/(zM-zm)); //dots colors scaled against z-value xfarcs(dots, c); //xfarcs(dots, c); // Uncomment to display all data in Scilab 5.5.2 (64-bit) Win7 xgrid(color("grey70")); //a better grid style: a = gca(); a.grid_style=[8 8]; colorbar(zm,zM); /////// END OF CODE Thanks and regards, Rafael -------------- next part -------------- A non-text attachment was scrubbed... Name: xfarcs_one_call_Scilab5.5.2_Win7.gif Type: image/gif Size: 10284 bytes Desc: xfarcs_one_call_Scilab5.5.2_Win7.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: xfarcs_two_calls_Scilab5.5.2_Win7.gif Type: image/gif Size: 10462 bytes Desc: xfarcs_two_calls_Scilab5.5.2_Win7.gif URL: From sgougeon at free.fr Fri Oct 28 15:41:16 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Fri, 28 Oct 2016 15:41:16 +0200 Subject: [Scilab-users] grayplot In-Reply-To: References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> <58128F1D.7050003@free.fr> <5812A6CA.2080304@free.fr> Message-ID: <5813557C.1040404@free.fr> Le 28/10/2016 14:12, Rafael Guerra a ?crit : > Hi Samuel, > > Fyi, on my Scilab 5.5.2 (64-bit) Win 7 configuration, the code here below still fails for one xfarcs() call. > Uncommenting the second xfarcs() call does fix the plot (attached). > It looks like a bug. Or could it be only an issue with my configuration? no, it's a bug in this code: > > /////// START OF CODE > clf(); > x=[8030 8040 7998 8008 8037 7956 7937 7963 7919 7920]; > y=[9478 9533 9578 9590 9597 9626 9627 9723 9766 9768]; > z=[-2.39965177 1.81709373 -1.14068067 -2.95249772 -3.25881290 1.36802530 -1.46287727 ... > -6.40911865 1.03929353 1.49115121]; > > xm = min(x); xM = min(x); dx = strange(x); xM = max(x); > ym = min(y); yM = min(y); dy = strange(y); yM = max(y) Then it works. You may note as well that > colorbar(zm,zM); should rather be replaced with colorbar(zm, zM, [1 nc]) because the grey added in nc+1 position must not belong to the color scale. Samuel From jrafaelbguerra at hotmail.com Fri Oct 28 17:03:44 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Fri, 28 Oct 2016 15:03:44 +0000 Subject: [Scilab-users] grayplot In-Reply-To: <5813557C.1040404@free.fr> References: <58121395.1040001@free.fr> <58121493.4040606@free.fr> <5812442D.7090704@free.fr> <58128F1D.7050003@free.fr> <5812A6CA.2080304@free.fr> <5813557C.1040404@free.fr> Message-ID: Oops, a silly mistake has slipped in. It's all in order now :) Cheers, Rafael -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Samuel Gougeon Sent: Friday, October 28, 2016 3:41 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] grayplot Le 28/10/2016 14:12, Rafael Guerra a ?crit : > Hi Samuel, > > Fyi, on my Scilab 5.5.2 (64-bit) Win 7 configuration, the code here below still fails for one xfarcs() call. > Uncommenting the second xfarcs() call does fix the plot (attached). > It looks like a bug. Or could it be only an issue with my configuration? no, it's a bug in this code: > > /////// START OF CODE > clf(); > x=[8030 8040 7998 8008 8037 7956 7937 7963 7919 7920]; > y=[9478 9533 9578 9590 9597 9626 9627 9723 9766 9768]; > z=[-2.39965177 1.81709373 -1.14068067 -2.95249772 -3.25881290 1.36802530 -1.46287727 ... > -6.40911865 1.03929353 1.49115121]; > > xm = min(x); xM = min(x); dx = strange(x); xM = max(x); > ym = min(y); yM = min(y); dy = strange(y); yM = max(y) Then it works. You may note as well that > colorbar(zm,zM); should rather be replaced with colorbar(zm, zM, [1 nc]) because the grey added in nc+1 position must not belong to the color scale. Samuel _______________________________________________ users mailing list users at lists.scilab.org http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Sun Oct 30 17:39:40 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 30 Oct 2016 17:39:40 +0100 Subject: [Scilab-users] Changes on ATOMS to post toolboxes for Scilab 6 In-Reply-To: <576D5467.9010005@scilab-enterprises.com> References: <576D4156.1060206@scilab-enterprises.com> <576D5467.9010005@scilab-enterprises.com> Message-ID: <5816224C.30903@free.fr> Hello, Le 24/06/2016 17:40, Scilab Team a ?crit : > Dear Scilab Users, > > > We've made a few changes on the ATOMS website > (https://atoms.scilab.org), in order to provide better support for the > 6.0 release, and to improve the speed and ease of use of ATOMS. The > general idea was to have simple things that work well rather than more > complex things that work sometimes only. > . For the time being, we have mainly more simple things that work worse or not at all. After that message , let's go on with this. It is blocking: I tried with Firefox and with Chrome. Both give the same display with no way to set the required Scilab version. Hence the binary can't be posted. Hope reading you asap Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ifbifcig.png Type: image/png Size: 44511 bytes Desc: not available URL: From sgougeon at free.fr Sun Oct 30 18:05:24 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 30 Oct 2016 18:05:24 +0100 Subject: [Scilab-users] Changes on ATOMS to post toolboxes for Scilab 6 In-Reply-To: <576D5467.9010005@scilab-enterprises.com> References: <576D4156.1060206@scilab-enterprises.com> <576D5467.9010005@scilab-enterprises.com> Message-ID: <58162854.30107@free.fr> Le 24/06/2016 17:40, Scilab Team a ?crit : > Dear Scilab Users, > > > We've made a few changes on the ATOMS website > (https://atoms.scilab.org), in order to provide better support for the > 6.0 release, and to improve the speed and ease of use of ATOMS. The > general idea was to have simple things that work well rather than more > complex things that work sometimes only > .../... > *Known issues:* > > * History may not work very well > * Email notifications have not yet been improved (i am > highlighting this) > . Actually, they are rather being totally killed : it is no longer possible to subscribe or to unsubscribe to any ATOMS pages, neither with the checkbox on the module's page, nor through the ATOMS Preferences page listing all modules. So, for instance when we post a comment for a toolbox we did not subscribe to before june, it is impossible to receive answers and follow up the discussion. This was reported more than one month ago, but nothing has been repaired: http://bugzilla.scilab.org/14786 Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Sun Oct 30 18:58:59 2016 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 30 Oct 2016 18:58:59 +0100 Subject: [Scilab-users] Changes on ATOMS to post toolboxes for Scilab 6 In-Reply-To: <576D5467.9010005@scilab-enterprises.com> References: <576D4156.1060206@scilab-enterprises.com> <576D5467.9010005@scilab-enterprises.com> Message-ID: <581634E3.2060507@free.fr> Le 24/06/2016 17:40, Scilab Team a ?crit : > Dear Scilab Users, > > > We've made a few changes on the ATOMS website > (https://atoms.scilab.org), in order to provide better support for the > 6.0 release, and to improve the speed and ease of use of ATOMS. The > general idea was to have simple things that work well rather than more > complex things that work sometimes only. > .../... > > * > Complete change log:* > > * .../... Search is now usable in FileExchange (was so slow it was > unusable before) > * On Fileexchange, groups of files are now called "file sets" > . On file exchange, it is no longer possible to display the page of the last version of a fileset when this one has several versions: http://bugzilla.scilab.org/14828 So, could you just tell us the interest to add a fileset version upgraded to Scilab 6 whether the related page can't be displayed for anyone (ever for the fileset admin)? For instance, try this one: https://fileexchange.scilab.org/toolboxes/140000/*6.0* The 1.0 version is displayed. This is the same for all filesets with several versions, and that lasts for 5 months now. For ATOMS as well as for FileExchange, while inviting them to upgrade contributions to Scilab 6.0, it would be kind -- or may be just normal -- to /allow/ authors and users to /really /manage and reach /external/ contributions. Hope reading you asap Samuel Gougeon PS: You look to aim forcing authors using the BSD lisence for filesets, since nothing has been done to reopen the choice after this strict restriction since June. This is also blocking. All these blocking bugs and limitations and S/E passivity about them are a strong invitation to build a general contribs repository out of S/E infrastructures. This would relieve S/E to concentrate on its business, and would enable authors and users working normally. -------------- next part -------------- An HTML attachment was scrubbed... URL: From perrichon.pierre at wanadoo.fr Mon Oct 31 17:40:48 2016 From: perrichon.pierre at wanadoo.fr (Perrichon) Date: Mon, 31 Oct 2016 17:40:48 +0100 Subject: [Scilab-users] AFFICH_m component doesn't work on Scilab-Xcos 6b2x64 (scilab-master-1477839510_x64 31.10.2016)) Message-ID: <001001d23395$894aa580$9bdff080$@wanadoo.fr> Dear Scilab Team, AFFICH_m component displays nothing and produces an error : scicos_flat: Not connected super block input scicos_flat: Invalid super block at 4 c_pass1: flat failed xcos_simulate : Erreur ? la mise ? jour des param?tres de bloc. See bugzilla #14835 for attached file. 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: 10565 bytes Desc: not available URL: