[Scilab-users] interpreting showprofile results
Hello, I am trying to profile a function. The steps I've done so far, after loading all functions into workspace, is add_profile("myfunc") profile(myfunc) showprofile(myfunc) The last command returns the text of the funtion with the array to the right |0|0|4 | |0|0|0 | |0|0|0 | |0|0|0 | |0|0|6 | I understand col#1 is #calls, col#2 is time, and col#3 is complexity... what is confusing to me is that col#1 and col#2 contain all zeros. have I misunderstood the use of these functions? Candice -- View this message in context: http://mailinglists.scilab.org/interpreting-showprofile-results-tp4031384.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] interpreting showprofile results
Hi Samuel, Thank you for your reply. I am using SciLab 5.5.1. I will try to multiply the results by 1000; in the meantime, since this bug should be fixed in the version I downloaded, please let me know if there's something else I can do. Candio -- View this message in context: http://mailinglists.scilab.org/interpreting-showprofile-results-tp4031384p4031409.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] interpreting showprofile results
In the meantime, I did try to multiply by 1000, but it appears that the results are identically equal to 0 - not just off an order of magnitude. format(20); profile(myfun) ans = 0.0.0. 0.0.0. 0.0.4. 0.0.4. 0.0.4. 0.0.4. 0.0.4. ans(:,2) = ans(:,2)*1000 ans = 0.0.0. 0.0.0. 0.0.4. 0.0.4. 0.0.4. 0.0.4. 0.0.4. 0.0.4. -->ans(:,1) ans = 0. 0. 0. 0. 0. 0. 0. Candio On Tue, Oct 21, 2014 at 8:55 AM, Candio [via Scilab / Xcos - Mailing Lists Archives] wrote: > Hi Samuel, > > Thank you for your reply. I am using SciLab 5.5.1. > > I will try to multiply the results by 1000; in the meantime, since this > bug should be fixed in the version I downloaded, please let me know if > there's something else I can do. > > Candio > > -- > If you reply to this email, your message will be added to the discussion > below: > > http://mailinglists.scilab.org/interpreting-showprofile-results-tp4031384p4031409.html > To unsubscribe from interpreting showprofile results, click here > <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4031384&code=c29tZXBoYW50YXN0aWtAZ21haWwuY29tfDQwMzEzODR8LTEwNTE1ODU5MA==> > . > NAML > <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://mailinglists.scilab.org/interpreting-showprofile-results-tp4031384p4031415.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] interpreting showprofile results
Hi Samuel, It works beautifully now; thank you for helping me understand how to use the profiling functions correctly. Candio On Wed, Oct 22, 2014 at 9:30 AM, Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives] wrote: > Hello Candio, > I just caught it: add_profile() prepares the function to profiling. But > then, the profile is really set when calling the function. Each new call > cumulates the execution time and occurrence numbers for each line. In your > case, you did not call the function at all before asking to display its > profile. After add_profile, and before any profile display (profile, > showprofile, ..), just call the function ; actually execute it. Then, you > will see its profile actualized with non-null results. > Regards > Samuel > > ----- Mail original - > De: "Candio" <[hidden email] > <http://user/SendEmail.jtp?type=node&node=4031420&i=0>> > À: [hidden email] <http://user/SendEmail.jtp?type=node&node=4031420&i=1> > Envoyé: Mardi 21 Octobre 2014 22:42:42 > Objet: Re: [Scilab-users] interpreting showprofile results > > > In the meantime, I did try to multiply by 1000, but it appears that the > results are identically equal to 0 - not just off an order of magnitude. > > format(20); > profile(myfun) > ans = > > 0. 0. 0. > 0. 0. 0. > 0. 0. 4. > 0. 0. 4. > 0. 0. 4. > 0. 0. 4. > 0. 0. 4. > > ans(:,2) = ans(:,2)*1000 > ans = > > 0. 0. 0. > 0. 0. 0. > 0. 0. 4. > 0. 0. 4. > 0. 0. 4. > 0. 0. 4. > 0. 0. 4. > 0. 0. 4. > > > -->ans(:,1) > ans = > > 0. > 0. > 0. > 0. > 0. > 0. > 0. > > > Candio > > On Tue, Oct 21, 2014 at 8:55 AM, Candio [via Scilab / Xcos - Mailing Lists > Archives] < [hidden email] > wrote: > > > Hi Samuel, > > Thank you for your reply. I am using SciLab 5.5.1. > > I will try to multiply the results by 1000; in the meantime, since this > bug should be fixed in the version I downloaded, please let me know if > there's something else I can do. > > Candio > > > > > If you reply to this email, your message will be added to the discussion > below: > http://mailinglists.scilab.org/interpreting-showprofile-results-tp4031384p4031409.html > > > > To unsubscribe from interpreting showprofile results, click here . > NAML > > > View this message in context: Re: interpreting showprofile results > Sent from the Scilab users - Mailing Lists Archives mailing list archive > at Nabble.com. > > ___ > users mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=4031420&i=2> > http://lists.scilab.org/mailman/listinfo/users > ___ > users mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=4031420&i=3> > http://lists.scilab.org/mailman/listinfo/users > > > -- > If you reply to this email, your message will be added to the discussion > below: > > http://mailinglists.scilab.org/interpreting-showprofile-results-tp4031384p4031420.html > To unsubscribe from interpreting showprofile results, click here > <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4031384&code=c29tZXBoYW50YXN0aWtAZ21haWwuY29tfDQwMzEzODR8LTEwNTE1ODU5MA==> > . > NAML > <http://mailinglists.scilab.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://mailinglists.scilab.org/interpreting-showprofile-results-tp4031384p4031421.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
[Scilab-users] ?E embedded scilab function in XCOS
Hello, I am looking to reflect in XCOS (Scilab 5.5.1) the Simulink EML block. I cannot find a way to include embedded scilab code. I see a scilab function can be called if it is loaded into the workspace, but this isn't quite what I'm looking for. Does there exist a way to include embedded scilab code in XCOS? It looks like my question might be answered here; unfortunately I can't read German. http://www.gomatlab.de/embedded-function-block-in-scicos-scilab-t14301.html Candio -- View this message in context: http://mailinglists.scilab.org/E-embedded-scilab-function-in-XCOS-tp4031434.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Iterator in XCOS?
Hello, I don't understand the solution to this question. It appears the for/while iterator blocks have been removed in XCOS; however I don't understand the proposed work-around. Can you please clarify? Candice -- View this message in context: http://mailinglists.scilab.org/Iterator-in-XCOS-tp4030813p4031436.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Iterator in XCOS?
For anybody who might be interested in the future, here is how I brought the iterators palette into scilab 5.5.1: Get the source code for the Iterators palette. I had previously downloaded Scicoslab 4.4.1, so I went into the folder \scicoslab-4.4.1\macros\scicos_blocks\Iterators Copy the whole folder (Iterators) to \scilab-5.5.1\modules\scicos_blocks\macros add the iterators library: SCI=getenv('SCI') genlib('scsiteratorslib','SCI/macros/scicos_blocks/Iterators') add the palette as described above: interfaces = ["BIGSOM_f" "RAMP" "ForIterator"]; pal = xcosPal('Iterators'); for i=1:size(interfaces, '*') pal = xcosPalAddBlock(pal, interfaces(i)); end xcosPalAdd(pal) If there exists a better way, I'd love to hear it. Regards, Candio -- View this message in context: http://mailinglists.scilab.org/Iterator-in-XCOS-tp4030813p4031441.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
[Scilab-users] for loop in xcos
Hello, I've been trying to implement a for loop in xcos and have so far been unsuccessful: 1) I grabbed the source code from the ForIterator interfacing function in ScicosLab and figured out how to get it working in SciLab 5.5.1/Xcos. However, it is truly mysterious and I was not able to get it working correctly. 2) I've been working on a manual for loop using if/else logic, but I cannot figure out how to reset the counter at the beginning of each time step. Attached is an example of my feeble attempt. If someone can give me some advice on how to make progress with either 1) or 2), I would be grateful. Candio forLoopSubsystem.zcos <http://mailinglists.scilab.org/file/n4031449/forLoopSubsystem.zcos> -- View this message in context: http://mailinglists.scilab.org/for-loop-in-xcos-tp4031449.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users