From j.s.strom at hslmg.de Sun May 1 19:04:28 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 01 May 2016 19:04:28 +0200 Subject: [Scilab-users] Transparent 2D contour plot In-Reply-To: <5724F83E.40308@hslmg.de> References: <57233EB1.7060509@hslmg.de> <57236325.609@hslmg.de> <5724C7F8.5020300@free.fr> <5724F83E.40308@hslmg.de> Message-ID: <5726371C.8070207@hslmg.de> Hallo Scilab experts, If I draw two 2D contour plots on top of each other the lower one is completely hidden. How can get the top one /transparent/ so that the lines of both contour plots become visible? Kind regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Sun May 1 23:37:36 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Sun, 01 May 2016 23:37:36 +0200 Subject: [Scilab-users] Transparent 2D contour plot In-Reply-To: <5726371C.8070207@hslmg.de> References: <57233EB1.7060509@hslmg.de> <57236325.609@hslmg.de> <5724C7F8.5020300@free.fr> <5724F83E.40308@hslmg.de> <5726371C.8070207@hslmg.de> Message-ID: <57267720.5020303@hslmg.de> Don't respond to this question. It's too strange. Just plot one contour command after the other. That's it. Sorry for asking. Jens -------------------------------------------------------------------------------------------------------------------------------- Am 01.05.2016 19:04, schrieb Jens Simon Strom: > Hallo Scilab experts, > If I draw two 2D contour plots on top of each other the lower one is > completely hidden. How can get the top one /transparent/ so that the > lines of both contour plots become visible? > Kind regards > Jens > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.monmayrant at laas.fr Mon May 2 09:11:40 2016 From: antoine.monmayrant at laas.fr (Antoine Monmayrant) Date: Mon, 2 May 2016 09:11:40 +0200 Subject: [Scilab-users] scilab 6.0 beta, command line history and freezes In-Reply-To: <57234FD8.6030608@scilab-enterprises.com> References: <5721D0EB.5020308@laas.fr> <57223EBE.70702@scilab-enterprises.com> <5723027D.6030405@laas.fr> <57234FD8.6030608@scilab-enterprises.com> Message-ID: <5726FDAC.7090403@laas.fr> Le 04/29/2016 02:13 PM, Pierre-Aim? Agnel a ?crit : > Hi, > > Basically, Yes :) OK, could you thus tell me what I am supposed to type to get you the backtrace? I'll update the bug report with it. Cheers, Antoine > The problem with such bug is that it is quite difficult to analyze > properly without a backtrace, and it didn't happen with most system > configurations (besides it "froze" scilab leaving you no choice but to > kill it without having the material to report) > > Thanks a bunch for the update. > > Le 29/04/2016 08:43, Antoine Monmayrant a ?crit : >> The command below requires a sudo on my system: >>> |sudo gdb --pid=$(pidof scilab-bin scilab-cli-bin lt-scilab-bin >>> lt-scilab-cli-bin) --eval-command='thread apply all bt'| >>> >>> This will attach gdb to your stuck scilab, you can then post the >>> back trace and we can analyze where the problem is. >> >> Er, OK, but what are you talking about? >> >> gdb --please-be-nice-give-me-something-called-a-backtrace? >> >> Antoine >> (never used gdb) >> >> >> _______________________________________________ >> users mailing list >> users at lists.scilab.org >> http://lists.scilab.org/mailman/listinfo/users > > -- > Pierre-Aim? Agnel > R&D Projects Manager > Phone: +33.1.80.77.04.67 > Mobile: +33.6.82.49.35.23 > ----------------------------------------------------------- > Scilab Enterprises > 143bis rue Yves Le Coz - 78000 Versailles, France > Phone: +33.1.80.77.04.60 > http://www.scilab-enterprises.com > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From marek.havrilla at gmail.com Mon May 2 15:32:14 2016 From: marek.havrilla at gmail.com (laftek) Date: Mon, 2 May 2016 06:32:14 -0700 (MST) Subject: [Scilab-users] CEVENTSCOPE 2 and more inputs Message-ID: <1462195934521-4034055.post@n3.nabble.com> Hi guys. I cant set 2 inputs for CEVENTSCOPE block(Event handling). Could you help me ? Thanks. -- View this message in context: http://mailinglists.scilab.org/CEVENTSCOPE-2-and-more-inputs-tp4034055.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From paul.bignier at scilab-enterprises.com Mon May 2 15:39:01 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Mon, 2 May 2016 15:39:01 +0200 Subject: [Scilab-users] CEVENTSCOPE 2 and more inputs In-Reply-To: <1462195934521-4034055.post@n3.nabble.com> References: <1462195934521-4034055.post@n3.nabble.com> Message-ID: <57275875.6050707@scilab-enterprises.com> Hello, Do you get en error message? You are supposed to modify the "colors" field so its dimensions matches the number of inputs you have set. For instance if you want 3 inputs, the "color" field can be set to [1 2 3]. Regards, Paul On 05/02/2016 03:32 PM, laftek wrote: > Hi guys. I cant set 2 inputs for CEVENTSCOPE block(Event handling). Could you > help me ? Thanks. > > > > -- > View this message in context: http://mailinglists.scilab.org/CEVENTSCOPE-2-and-more-inputs-tp4034055.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 -- Paul BIGNIER Development engineer ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.68 http://www.scilab-enterprises.com From marek.havrilla at gmail.com Mon May 2 15:43:18 2016 From: marek.havrilla at gmail.com (laftek) Date: Mon, 2 May 2016 06:43:18 -0700 (MST) Subject: [Scilab-users] Do I have the C compiler? In-Reply-To: References: <56E47A85.4050505@free.fr> Message-ID: <1462196598235-4034057.post@n3.nabble.com> Hello, i have the same problem. I installed scilab on 3 PC. I installed MinGW and MinGW toolbox. Evething worked like a charm. Then i uninstalled scilab and installed again and its now working anymore. Its some bug I think. -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Do-I-have-the-C-compiler-tp4033710p4034057.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From marek.havrilla at gmail.com Mon May 2 15:46:06 2016 From: marek.havrilla at gmail.com (laftek) Date: Mon, 2 May 2016 06:46:06 -0700 (MST) Subject: [Scilab-users] CEVENTSCOPE 2 and more inputs In-Reply-To: <57275875.6050707@scilab-enterprises.com> References: <57275875.6050707@scilab-enterprises.com> Message-ID: <1462196766695-4034058.post@n3.nabble.com> Thanks Paul for really quick respond. Its working now, so silly . -- View this message in context: http://mailinglists.scilab.org/Re-CEVENTSCOPE-2-and-more-inputs-tp4034056p4034058.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From j.s.strom at hslmg.de Mon May 2 17:45:32 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Mon, 02 May 2016 17:45:32 +0200 Subject: [Scilab-users] How to find number of polylines automatically In-Reply-To: <1462196766695-4034058.post@n3.nabble.com> References: <57275875.6050707@scilab-enterprises.com> <1462196766695-4034058.post@n3.nabble.com> Message-ID: <5727761C.8050308@hslmg.de> Hi, By the line for i=1:n; ca.children(i).children.foreground=5; end one can change all level lines of a 2D contour plot to red. But how can the script find n (without manual trial and error? Regards, Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.s.strom at hslmg.de Mon May 2 18:04:41 2016 From: j.s.strom at hslmg.de (Jens) Date: Mon, 2 May 2016 09:04:41 -0700 (MST) Subject: [Scilab-users] How to find the number of polylines automatically Message-ID: <1462205081631-4034060.post@n3.nabble.com> Hi, By the line for i=1:n; ca.children(i).children.foreground=5; end one can change all level lines of a 2D contour plot to red. But how can the script find n (without manual trial and error)? Regards, Jens p.s. I have unadvertently posted this question already, but in the wrong place. Sorry -- View this message in context: http://mailinglists.scilab.org/How-to-find-the-number-of-polylines-automatically-tp4034060.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Mon May 2 18:51:38 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Mon, 2 May 2016 18:51:38 +0200 (CEST) Subject: [Scilab-users] How to find the number of polylines automatically In-Reply-To: <1462205081631-4034060.post@n3.nabble.com> Message-ID: <2064613909.230325142.1462207898350.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello, >De: "Jens" >Hi, >By the line > >for i=1:n; ca.children(i).children.foreground=5; end > >one can change all level lines of a 2D contour plot to red. But how can the >script find n (without manual trial and error)? With length(ca.children) ? I may miss something... Samuel From j.s.strom at hslmg.de Mon May 2 19:21:35 2016 From: j.s.strom at hslmg.de (Jens Simon Strom) Date: Mon, 02 May 2016 19:21:35 +0200 Subject: [Scilab-users] How to find the number of polylines automatically In-Reply-To: <2064613909.230325142.1462207898350.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <2064613909.230325142.1462207898350.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <57278C9F.2040506@hslmg.de> Hello, You didn't miss anything. I did: I tried /size/ but I did not try /length/ although it is so self-evident. Solved. Thanks a lot! Jens ---------------------------------------------------------------------- Am 02.05.2016 18:51, schrieb sgougeon at free.fr: > Hello, > >> De: "Jens" >> Hi, >> By the line >> >> for i=1:n; ca.children(i).children.foreground=5; end >> >> one can change all level lines of a 2D contour plot to red. But how can the >> script find n (without manual trial and error)? > > With > length(ca.children) > ? > I may miss something... > > Samuel > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Mon May 2 19:37:45 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Mon, 2 May 2016 19:37:45 +0200 (CEST) Subject: [Scilab-users] How to find the number of polylines automatically In-Reply-To: <57278C9F.2040506@hslmg.de> Message-ID: <601341927.230481441.1462210665981.JavaMail.root@zimbra75-e12.priv.proxad.net> >De: "Jens Simon Strom" > >You didn't miss anything. I did: I tried size but I did not try length although it is so self-evident. size(ca.children,1) // works as well From umut.durak at tu-clausthal.de Tue May 3 19:24:20 2016 From: umut.durak at tu-clausthal.de (Dr.Umut Durak) Date: Tue, 03 May 2016 19:24:20 +0200 Subject: [Scilab-users] Using test_run for unit testing Xcos models Message-ID: Folks, I would like to use test_run for testing my own models. It works perfect for testing modules but anyone can help me or provide me some examples. test_run("Directors to the tst files") seems not working. Bests, Umut From pierre-aime.agnel at scilab-enterprises.com Wed May 4 08:33:05 2016 From: pierre-aime.agnel at scilab-enterprises.com (=?UTF-8?Q?Pierre-Aim=c3=a9_Agnel?=) Date: Wed, 4 May 2016 08:33:05 +0200 Subject: [Scilab-users] scilab 6.0 beta, command line history and freezes In-Reply-To: <5726FDAC.7090403@laas.fr> References: <5721D0EB.5020308@laas.fr> <57223EBE.70702@scilab-enterprises.com> <5723027D.6030405@laas.fr> <57234FD8.6030608@scilab-enterprises.com> <5726FDAC.7090403@laas.fr> Message-ID: <335487f9-d87d-043a-966d-9f146ca7122b@scilab-enterprises.com> Hi, Le 02/05/2016 ? 09:11, Antoine Monmayrant a ?crit : > Le 04/29/2016 02:13 PM, Pierre-Aim? Agnel a ?crit : >> Hi, >> >> Basically, Yes :) > OK, could you thus tell me what I am supposed to type to get you the > backtrace? > I'll update the bug report with it. > The command is: bt > Cheers, > > Antoine >> The problem with such bug is that it is quite difficult to analyze >> properly without a backtrace, and it didn't happen with most system >> configurations (besides it "froze" scilab leaving you no choice but >> to kill it without having the material to report) >> >> Thanks a bunch for the update. >> >> Le 29/04/2016 08:43, Antoine Monmayrant a ?crit : >>> The command below requires a sudo on my system: >>>> |sudo gdb --pid=$(pidof scilab-bin scilab-cli-bin lt-scilab-bin >>>> lt-scilab-cli-bin) --eval-command='thread apply all bt'| >>>> >>>> This will attach gdb to your stuck scilab, you can then post the >>>> back trace and we can analyze where the problem is. >>> >>> Er, OK, but what are you talking about? >>> >>> gdb --please-be-nice-give-me-something-called-a-backtrace? >>> >>> Antoine >>> (never used gdb) >>> >>> >>> _______________________________________________ >>> users mailing list >>> users at lists.scilab.org >>> http://lists.scilab.org/mailman/listinfo/users >> >> -- >> Pierre-Aim? Agnel >> R&D Projects Manager >> Phone: +33.1.80.77.04.67 >> Mobile: +33.6.82.49.35.23 >> ----------------------------------------------------------- >> Scilab Enterprises >> 143bis rue Yves Le Coz - 78000 Versailles, France >> Phone: +33.1.80.77.04.60 >> http://www.scilab-enterprises.com >> >> >> _______________________________________________ >> 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 -- Pierre-Aim? Agnel R&D Projects Manager Phone: +33.1.80.77.04.67 Mobile: +33.6.82.49.35.23 ----------------------------------------------------------- Scilab Enterprises 143bis rue Yves Le Coz - 78000 Versailles, France Phone: +33.1.80.77.04.60 http://www.scilab-enterprises.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From noguchi at kje.biglobe.ne.jp Fri May 6 10:42:39 2016 From: noguchi at kje.biglobe.ne.jp (noguchi) Date: Fri, 6 May 2016 01:42:39 -0700 (MST) Subject: [Scilab-users] lookup_f in XCos In-Reply-To: References: Message-ID: <1462524159990-4034073.post@n3.nabble.com> Hello, I also trying to use lookup_f block and I failed to find a manual to undestand how to use it. If I edit curve in the edit_curve window and close it, the curve is back to original curve. If someone has a memo how we should use this block, could you please share it? Thanks, Noguchi -- View this message in context: http://mailinglists.scilab.org/Scilab-users-lookup-f-in-XCos-tp4025093p4034073.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From samarendra at iitb.ac.in Fri May 6 12:01:50 2016 From: samarendra at iitb.ac.in (Samarendra) Date: Fri, 6 May 2016 15:31:50 +0530 Subject: [Scilab-users] How do you use GPUs with Scilab? Message-ID: <0ad08a40-9c8e-9780-3db4-63349b894558@iitb.ac.in> Hi all, How do you use GPUs with Scilab ? Is it using the SciGPGPU toolbox ? Or something else? If yes, what is your CUDA toolkit version, OS and architecture ? I have tried setting up the SciGPGPU toolbox but am stuck at some compilation errors which I have reported. I have also heard about the sciCUDA toolbox in this mailing list but the page http://forge.scilab.org/index.php/p//sciCuda// does not open for me and raises a permission error. I have a Linux 64-bit machine with an NVIDIA GPU and CUDA toolkit version 7.5. I am ready to setup an older version of CUDA too if required. Thank you. Regards, Samarendra -------------- next part -------------- An HTML attachment was scrubbed... URL: From clement.david at scilab-enterprises.com Mon May 9 18:30:11 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Mon, 09 May 2016 18:30:11 +0200 Subject: [Scilab-users] Using test_run for unit testing Xcos models In-Reply-To: References: Message-ID: <1462811411.2494.38.camel@scilab-enterprises.com> Hello Umut, All Scilab facilities are designed to work for "external modules" or "toolboxes". The toolbox_skeleton (shipped with scilab) provide such a standard organization with tests. Just use : ? ? test_run('path_to_my_toolbox'); Each test is a Scilab script and you can use special documented headers to pre-load Xcos before the test start. Regards, -- Cl?ment Le mardi 03 mai 2016 ? 19:24 +0200, Dr.Umut Durak a ?crit?: > Folks, > I would like to use test_run for testing my own models. It works perfect for? > testing modules but anyone can help me or provide me some examples. > test_run("Directors to the tst files") seems not working. > Bests, > Umut > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From shamika.i.nair at gmail.com Tue May 10 10:54:43 2016 From: shamika.i.nair at gmail.com (Shamika Mohanan) Date: Tue, 10 May 2016 14:24:43 +0530 Subject: [Scilab-users] List API function error Message-ID: I'm using Scilab API list function to access 2D/3D matrices from Scilab environment in the C++ code. This list is then converted into a Mat object and passed to OpenCV. I'm having trouble accessing the child elements of the list. int retrieveImage(Mat &image,int pos) { SciErr sciErr; int iRows=0,iCols=0,i,j,k=0; int *piAddr = NULL; int *piAddrChild = NULL; int iPrec = 0,iItem = 0; //retrieving number of items in the list and type of data(integer/float) sciErr = getVarAddressFromPosition(pvApiCtx,pos,&piAddr); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } sciErr = getListItemAddress(pvApiCtx,piAddr,1,&piAddrChild); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } sciErr = getListItemNumber(pvApiCtx,piAddr,&iItem); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } if(isIntegerType(pvApiCtx, piAddrChild)) { // Retrieve 2D/3D matrices of int type } else //for floating point/ double precision values { if(iItem==3) { double *pstDataR = NULL; double *pstDataG = NULL; double *pstDataB = NULL; sciErr = getVarAddressFromPosition(pvApiCtx,pos,&piAddr); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } //retrive the matrix of the R values sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, 1, &iRows, &iCols, &pstDataR); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } //retrive address of the list sciErr = getVarAddressFromPosition(pvApiCtx,pos,&piAddr); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } //retrive the matrix of the G values sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, 2, &iRows, &iCols, &pstDataG); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } //retrive address of the list sciErr = getVarAddressFromPosition(pvApiCtx,pos,&piAddr); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } //retrive the matrix of the B values sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, 3, &iRows, &iCols, &pstDataB); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } //creating an image matrix with the no. of rows and columns we retrieved, and assigning it to be of the form 8-bit unsinged integers image = Mat(iRows,iCols,CV_64FC3); //Now that we have the 3 matrices(R,G,B), we need to assign those values to the pixels. The following code does this k=0; for(i=0;i(i,j)[2]=pstDataR[i+iRows*j]; image.at(i,j)[1]=pstDataG[i+iRows*j]; image.at(i,j)[0]=pstDataB[i+iRows*j]; } } } else { // Grayscale images double *pstDataR = NULL; sciErr = getVarAddressFromPosition(pvApiCtx,pos,&piAddr); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } //retrive one 2D matrix of image sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, 1, &iRows, &iCols, &pstDataR); if(sciErr.iErr) { printError(&sciErr, 0); return 0; } image = Mat(iRows,iCols,CV_64FC1); //Assigning image matrix values to pixels k=0; for(i=0;i(i,j)=pstDataR[i+iRows*j]; } } return 1; } When I use this function, 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 is wrong with the code? Shamika -------------- next part -------------- An HTML attachment was scrubbed... URL: From grivet at cnrs-orleans.fr Tue May 17 11:57:32 2016 From: grivet at cnrs-orleans.fr (grivet) Date: Tue, 17 May 2016 11:57:32 +0200 Subject: [Scilab-users] How to find the number of polylines automatically In-Reply-To: <601341927.230481441.1462210665981.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <601341927.230481441.1462210665981.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: <9d758448-3b82-4f71-e6cf-0b720c4d0e14@cnrs-orleans.fr> Hello, Is it possible, within Scilab 5.2, to display tics_labels in European format, i.e. with commas instead of points as decimal separators ? Thank you for any suggestion JP Grivet From marek.havrilla at gmail.com Tue May 17 14:15:24 2016 From: marek.havrilla at gmail.com (laftek) Date: Tue, 17 May 2016 05:15:24 -0700 (MST) Subject: [Scilab-users] superblock bug ? Message-ID: <1463487324923-4034096.post@n3.nabble.com> Hi everyone. I create this simple model to find out phase angle between voltage and current. I wrote script for it(second scope) so if current is earlier than voltage then outup is -1 etc. It is working nice but if i try to make superblock then save it and use it again it is not working. It erases current or voltage course from simulation so I am getting wrong results. Is it bug or there is some work around. Thanks in advance -- View this message in context: http://mailinglists.scilab.org/superblock-bug-tp4034096.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Tue May 17 15:35:14 2016 From: sgougeon at free.fr (sgougeon at free.fr) Date: Tue, 17 May 2016 15:35:14 +0200 (CEST) Subject: [Scilab-users] ticks labels with coma instead of dot for decimal separator In-Reply-To: <9d758448-3b82-4f71-e6cf-0b720c4d0e14@cnrs-orleans.fr> Message-ID: <857015689.328608841.1463492114278.JavaMail.root@zimbra75-e12.priv.proxad.net> >De: "grivet" >Envoy?: Mardi 17 Mai 2016 11:57:32 >Objet: Re: [Scilab-users] How to find the number of polylines automatically > >Hello, >Is it possible, within Scilab 5.2, to display tics_labels in European >format, i.e. with commas instead of points as >decimal separators ? Hello, As far as i know, gca().ticks_format does not allow to change the decimal separator. However, you can post-process default labels with strsubst(): x = linspace(0,2,100); plot(x, sin(x)) ax = gca(); ax.x_ticks.labels = strsubst(ax.x_ticks.labels,".",","); ax.y_ticks.labels = strsubst(ax.y_ticks.labels,".",","); ax.font_size = 3; HTH Samuel Gougeon From grivet at cnrs-orleans.fr Wed May 18 11:43:59 2016 From: grivet at cnrs-orleans.fr (grivet) Date: Wed, 18 May 2016 11:43:59 +0200 Subject: [Scilab-users] ticks labels with coma instead of dot for decimal separator In-Reply-To: <857015689.328608841.1463492114278.JavaMail.root@zimbra75-e12.priv.proxad.net> References: <857015689.328608841.1463492114278.JavaMail.root@zimbra75-e12.priv.proxad.net> Message-ID: Thank you Samuel: your suggestion works like a charm (and also for inserting the correct subject heading). JP Grivet > Hello, > > As far as i know, gca().ticks_format does not allow to change the decimal separator. > However, you can post-process default labels with strsubst(): > > x = linspace(0,2,100); > plot(x, sin(x)) > ax = gca(); > ax.x_ticks.labels = strsubst(ax.x_ticks.labels,".",","); > ax.y_ticks.labels = strsubst(ax.y_ticks.labels,".",","); > ax.font_size = 3; > > HTH > Samuel Gougeon > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From flotschos at gmail.com Mon May 23 23:15:20 2016 From: flotschos at gmail.com (Florian Winter) Date: Mon, 23 May 2016 23:15:20 +0200 Subject: [Scilab-users] csvread different separator Message-ID: Hello I'm trying to write a function that reads data from a single file. It is a rather large file so I wanted to use the csvread function because it is faster than opening the file and then using scanf. The problem is, that my file is not a real csv file. It has different number of spaces in between every data entry. It looks like this: 1 2 3 4 5 6 7 8 the spaces between each entry is the same in every row so between 1 and 2 there is a single space, between 2 and 3 there are two spaces, between 3-4 and 4-5 three spaces, 5-6 one, 6-7 one and 7-8 three again. Is there a faster way than opening the file and using a scanf? Thank you! Florian -------------- next part -------------- An HTML attachment was scrubbed... URL: From chinluh at tritytech.com Tue May 24 03:27:26 2016 From: chinluh at tritytech.com (Tan Chin Luh) Date: Tue, 24 May 2016 09:27:26 +0800 Subject: [Scilab-users] csvread different separator In-Reply-To: References: Message-ID: <7c405c4a-1e83-a774-6926-edb90a737ca5@tritytech.com> How about fscanfMat? On 24/5/2016 5:15 AM, Florian Winter wrote: > 1 2 3 4 5 6 7 8 From Christophe.Dang at sidel.com Tue May 24 09:28:16 2016 From: Christophe.Dang at sidel.com (Dang Ngoc Chan, Christophe) Date: Tue, 24 May 2016 07:28:16 +0000 Subject: [Scilab-users] {EXT} csvread different separator In-Reply-To: References: Message-ID: Hello, > De : users [mailto:users-bounces at lists.scilab.org] De la part de Florian Winter > Envoy? : lundi 23 mai 2016 23:15 > > It is a rather large file so I wanted to use the csvread function > [...] > It looks like this: > > 1 2 3 4 5 6 7 8 You can try: a = csvRead("foo.csv", " ") b = a(~(isnan(a))) HTH 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 scilab.20.browseruk at xoxy.net Tue May 24 09:45:56 2016 From: scilab.20.browseruk at xoxy.net (scilab.20.browseruk at xoxy.net) Date: Mon, 23 May 2016 23:45:56 -0800 Subject: [Scilab-users] csvread different separator exclusive) In-Reply-To: Message-ID: <3646277611B.000009B9scilab.20.browseruk@xoxy.net> Florian, If you have Perl available, you could regularise the file with the following one-liner: perl -nle "print join ' ', split ' '" out.file (You'll need to switch 's to "s and vice versa if you're on *nix.) (Despite the way that looks, the split ' ' will habdle any number of intervening spaces or tabs and join ' ', will replace them with a single space. Use join "\t" to get a proper tab delimited output file.) It takes around 30s/GB on my machine. Cheers, Buk > -----Original Message----- > From: scilab.browseruk.c9f0207c9f.flotschos#gmail.com at ob.0sg.net > Sent: Mon, 23 May 2016 23:15:20 +0200 > To: users at lists.scilab.org > Subject: [Scilab-users] csvread different separator > exclusive) > > Hello > I'm trying to write a function that reads data from a single file. It is > a > rather large file so I wanted to use the csvread function because it is > faster than opening the file and then using scanf. The problem is, that > my > file is not a real csv file. It has different number of spaces in between > every data entry. > It looks like this: > > 1 2 3 4 5 6 7 8 > the spaces between each entry is the same in every row so between 1 and 2 > there is a single space, between 2 and 3 there are two spaces, between > 3-4 > and 4-5 three spaces, 5-6 one, 6-7 one and 7-8 three again. > > > Is there a faster way than opening the file and using a scanf? > > Thank you! > Florian ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! From Serge.Steer at inria.fr Tue May 24 14:05:27 2016 From: Serge.Steer at inria.fr (Serge Steer) Date: Tue, 24 May 2016 14:05:27 +0200 Subject: [Scilab-users] csvread different separator In-Reply-To: References: Message-ID: <57444387.2030408@inria.fr> Le 23/05/2016 23:15, Florian Winter a ?crit : > Hello > I'm trying to write a function that reads data from a single file. It > is a rather large file so I wanted to use the csvread function because > it is faster than opening the file and then using scanf. I am surprised by the fact csvread is faster than mfscanf. mfscanf directly call C code while csvread is xritten in Scilab... > The problem is, that my file is not a real csv file. It has different > number of spaces in between every data entry. > It looks like this: > > 1 2 3 4 5 6 7 8 > the spaces between each entry is the same in every row so between 1 > and 2 there is a single space, between 2 and 3 there are two spaces, > between 3-4 and 4-5 three spaces, 5-6 one, 6-7 one and 7-8 three again. > > > Is there a faster way than opening the file and using a scanf? > > Thank you! > Florian > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From rfabbri at gmail.com Tue May 24 23:19:36 2016 From: rfabbri at gmail.com (Ricardo Fabbri) Date: Tue, 24 May 2016 18:19:36 -0300 Subject: [Scilab-users] scilab 6.0.0-beta-1 on Mac OS X El Capitan In-Reply-To: <1459755653.25972.14.camel@scilab-enterprises.com> References: <1459577167720-4033887.post@n3.nabble.com> <1459663991628-4033892.post@n3.nabble.com> <1459688643311-4033893.post@n3.nabble.com> <1459755653.25972.14.camel@scilab-enterprises.com> Message-ID: Hi, Just letting you know I've updated the bugracker with a work-around. http://bugzilla.scilab.org/show_bug.cgi?id=14182 Thanks, -- Dr Ricardo Fabbri Professor of Computer Engineering GNU/Linux registered user #175401 www.lems.brown.edu/~rfabbri pt.wikipedia.org/wiki/IPRJ labmacambira.sf.net On Mon, Apr 4, 2016 at 4:40 AM, Cl?ment David wrote: > Hello, > > I guess there might be a bug on that support. You can add yourself to the CC list on the bugzilla > interface to be alerted on change. > > -- > Cl?ment > > Le dimanche 03 avril 2016 ? 06:04 -0700, jaipur a ?crit : >> Thank you. >> I understand that scilab 6.0.0-beta-1 does not support Mac OS X El Capitan. >> >> >> >> >> -- >> View this message in context: http://mailinglists.scilab.org/scilab-6-0-0-beta-1-on-Mac-OS-X-El-Ca >> pitan-tp4033887p4033893.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 > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From clement.david at scilab-enterprises.com Wed May 25 15:02:27 2016 From: clement.david at scilab-enterprises.com (=?ISO-8859-1?Q?Cl=E9ment?= David) Date: Wed, 25 May 2016 15:02:27 +0200 Subject: [Scilab-users] Hiding the long function scifunc_block In-Reply-To: References: Message-ID: <1464181347.3361.60.camel@scilab-enterprises.com> Hello Umut, This display setting is preset without any length restriction. I guess you should post a bug to explicit this request. I guess a reasonable implementation would be to limit the number of displayed char accordingly to the block bounds (to avoid any char out of the block bounds). Thanks, -- Cl?ment Le vendredi 29 avril 2016 ? 08:34 +0200, Dr.Umut Durak a ?crit?: > Folks, > > I have a long function expression in one of my scifunc_block. The block as? > default annotates the block with the exptession, which is quite good when? > the function is not that long. But this case it is a long one and I would? > like to hide the expression in the model but failed to find such a block? > setting. Any ideas? > > Umut > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From paul.carrico at esterline.com Thu May 26 11:30:26 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 26 May 2016 09:30:26 +0000 Subject: [Scilab-users] Vectorization issue Message-ID: <3A6B7233274DB449A2A0053A47684F953F6951E0@BGS-EX01.auxitrol.ad> Dear I failed in using vectorization in the example immediately bellow; but I do not remember if it's possible : any advice ? Thanks Paul ###################################################################################### mode(0) n = 20 Km = 0; b = 100; d = 20; nu = 0.3; // using loops for i = 0 : n for j = 1 : n Km = Km + (144*(b/d)^4)/( %pi^6*(2*i+1)^2*j^2*((2*i+1)^2*(b/2*d)^2+j^2) ); end end Km = 1.2 + (nu/(1+nu))*Km k = 1/Km // using vectorization a = [0:n]'; b = ones(n,1); i = a.*.b; j = b.*.a; Km2 = zeros(n*(n+1),1); //toto = i. *j Km2 = ( %pi.^6*((2*i+1).^2. * j.^2)*((2*. i+1).^2*(b/2*d).^2 + j^2) ) Km2 = (144*(b/d).^4)/ Km2 Km2 = 1.2 + (nu/(1+nu))*Km2 k2 = 1/Km2 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 May 26 12:26:05 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 26 May 2016 12:26:05 +0200 Subject: [Scilab-users] Vectorization issue In-Reply-To: <3A6B7233274DB449A2A0053A47684F953F6951E0@BGS-EX01.auxitrol.ad> References: <3A6B7233274DB449A2A0053A47684F953F6951E0@BGS-EX01.auxitrol.ad> Message-ID: Hi Paul, It seems that there may be some issues with the .*, .^ syntax and also the use of the same variable in different context (b). Editing the vectorization part of your code as follows: // using vectorization aa = [0:n]'; bb = ones(n,1); i = aa.*.bb; j = bb.*.aa; Km2 = zeros(n*(n+1),1); Km2 = %pi^6*((2*i+1).^2 .* j.^2).*((2*i+1).^2.*(b/2*d)^2 + j.^2) ; Km2 = (144*(b/d).^4)/ sum(Km2); Km2 = 1.2 + (nu/(1+nu))*Km2; k2 = 1/Km2 produces: k = 0.8333090 k2 = 0.8333333 A small difference. I did not check the formulas but it might be numerical error only. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Carrico, Paul Sent: Thursday, May 26, 2016 11:30 AM To: International users mailing list for Scilab. (users at lists.scilab.org) Subject: [Scilab-users] Vectorization issue Dear I failed in using vectorization in the example immediately bellow; but I do not remember if it?s possible : any advice ? Thanks Paul ################################################################################ ###### mode(0) n = 20 Km = 0; b = 100; d = 20; nu = 0.3; // using loops for i = 0 : n for j = 1 : n Km = Km + (144*(b/d)^4)/( %pi^6*(2*i+1)^2*j^2*((2*i+1)^2*(b/2*d)^2+j^2) ); end end Km = 1.2 + (nu/(1+nu))*Km k = 1/Km // using vectorization a = [0:n]'; b = ones(n,1); i = a.*.b; j = b.*.a; Km2 = zeros(n*(n+1),1); //toto = i. *j Km2 = ( %pi.^6*((2*i+1).^2. * j.^2)*((2*. i+1).^2*(b/2*d).^2 + j^2) ) Km2 = (144*(b/d).^4)/ Km2 Km2 = 1.2 + (nu/(1+nu))*Km2 k2 = 1/Km2 EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at esterline.com Thu May 26 12:38:13 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 26 May 2016 10:38:13 +0000 Subject: [Scilab-users] [EXTERNAL] Re: Vectorization issue In-Reply-To: References: <3A6B7233274DB449A2A0053A47684F953F6951E0@BGS-EX01.auxitrol.ad> Message-ID: <3A6B7233274DB449A2A0053A47684F953F695227@BGS-EX01.auxitrol.ad> Thanks Rafael for the answer One explanation of the error is that I used a and b letter instead of aa and bb in your example; your code, if I change aa -> a and bb -> it fails again ... why ? (I do not understand) EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data De : users [mailto:users-bounces at lists.scilab.org] De la part de Rafael Guerra Envoy? : jeudi 26 mai 2016 12:26 ? : 'Users mailing list for Scilab' Objet : [EXTERNAL] Re: [Scilab-users] Vectorization issue Hi Paul, It seems that there may be some issues with the .*, .^ syntax and also the use of the same variable in different context (b). Editing the vectorization part of your code as follows: // using vectorization aa = [0:n]'; bb = ones(n,1); i = aa.*.bb; j = bb.*.aa; Km2 = zeros(n*(n+1),1); Km2 = %pi^6*((2*i+1).^2 .* j.^2).*((2*i+1).^2.*(b/2*d)^2 + j.^2) ; Km2 = (144*(b/d).^4)/ sum(Km2); Km2 = 1.2 + (nu/(1+nu))*Km2; k2 = 1/Km2 produces: k = 0.8333090 k2 = 0.8333333 A small difference. I did not check the formulas but it might be numerical error only. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Carrico, Paul Sent: Thursday, May 26, 2016 11:30 AM To: International users mailing list for Scilab. (users at lists.scilab.org) > Subject: [Scilab-users] Vectorization issue Dear I failed in using vectorization in the example immediately bellow; but I do not remember if it's possible : any advice ? Thanks Paul ###################################################################################### mode(0) n = 20 Km = 0; b = 100; d = 20; nu = 0.3; // using loops for i = 0 : n for j = 1 : n Km = Km + (144*(b/d)^4)/( %pi^6*(2*i+1)^2*j^2*((2*i+1)^2*(b/2*d)^2+j^2) ); end end Km = 1.2 + (nu/(1+nu))*Km k = 1/Km // using vectorization a = [0:n]'; b = ones(n,1); i = a.*.b; j = b.*.a; Km2 = zeros(n*(n+1),1); //toto = i. *j Km2 = ( %pi.^6*((2*i+1).^2. * j.^2)*((2*. i+1).^2*(b/2*d).^2 + j^2) ) Km2 = (144*(b/d).^4)/ Km2 Km2 = 1.2 + (nu/(1+nu))*Km2 k2 = 1/Km2 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 May 26 13:27:20 2016 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Thu, 26 May 2016 13:27:20 +0200 Subject: [Scilab-users] [EXTERNAL] Re: Vectorization issue In-Reply-To: References: <3A6B7233274DB449A2A0053A47684F953F6951E0@BGS-EX01.auxitrol.ad> <3A6B7233274DB449A2A0053A47684F953F695227@BGS-EX01.auxitrol.ad> Message-ID: Hi Paul, ?b? seems to be already used in the Km and Km2 formulas and so, it cannot be used at the same time as an auxiliary variable with different meaning. Only ?b? needs to be changed. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Carrico, Paul Sent: Thursday, May 26, 2016 12:38 PM To: 'Users mailing list for Scilab' > Subject: Re: [Scilab-users] [EXTERNAL] Re: Vectorization issue Thanks Rafael for the answer One explanation of the error is that I used a and b letter instead of aa and bb in your example; your code, if I change aa -> a and bb -> it fails again why ? (I do not understand) De : users [mailto:users-bounces at lists.scilab.org] De la part de Rafael Guerra Envoy? : jeudi 26 mai 2016 12:26 ? : 'Users mailing list for Scilab' Objet : [EXTERNAL] Re: [Scilab-users] Vectorization issue Hi Paul, It seems that there may be some issues with the .*, .^ syntax and also the use of the same variable in different context (b). Editing the vectorization part of your code as follows: // using vectorization aa = [0:n]'; bb = ones(n,1); i = aa.*.bb; j = bb.*.aa; Km2 = zeros(n*(n+1),1); Km2 = %pi^6*((2*i+1).^2 .* j.^2).*((2*i+1).^2.*(b/2*d)^2 + j.^2) ; Km2 = (144*(b/d).^4)/ sum(Km2); Km2 = 1.2 + (nu/(1+nu))*Km2; k2 = 1/Km2 produces: k = 0.8333090 k2 = 0.8333333 A small difference. I did not check the formulas but it might be numerical error only. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Carrico, Paul Sent: Thursday, May 26, 2016 11:30 AM To: International users mailing list for Scilab. (users at lists.scilab.org ) > Subject: [Scilab-users] Vectorization issue Dear I failed in using vectorization in the example immediately bellow; but I do not remember if it?s possible : any advice ? Thanks Paul ############################ mode(0) n = 20 Km = 0; b = 100; d = 20; nu = 0.3; // using loops for i = 0 : n for j = 1 : n Km = Km + (144*(b/d)^4)/( %pi^6*(2*i+1)^2*j^2*((2*i+1)^2*(b/2*d)^2+j^2) ); end end Km = 1.2 + (nu/(1+nu))*Km k = 1/Km // using vectorization a = [0:n]'; b = ones(n,1); i = a.*.b; j = b.*.a; Km2 = zeros(n*(n+1),1); Km2 = ( %pi.^6*((2*i+1).^2. * j.^2)*((2*. i+1).^2*(b/2*d).^2 + j^2) ) Km2 = (144*(b/d).^4)/ Km2 Km2 = 1.2 + (nu/(1+nu))*Km2 k2 = 1/Km2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.carrico at esterline.com Thu May 26 13:29:21 2016 From: paul.carrico at esterline.com (Carrico, Paul) Date: Thu, 26 May 2016 11:29:21 +0000 Subject: [Scilab-users] [EXTERNAL] Re: Vectorization issue In-Reply-To: References: <3A6B7233274DB449A2A0053A47684F953F6951E0@BGS-EX01.auxitrol.ad> <3A6B7233274DB449A2A0053A47684F953F695227@BGS-EX01.auxitrol.ad> Message-ID: <3A6B7233274DB449A2A0053A47684F953F695256@BGS-EX01.auxitrol.ad> Obviously ... newbie error !!!!!! Thanks EXPORT CONTROL : Cet email ne contient pas de donn?es techniques This email does not contain technical data De : users [mailto:users-bounces at lists.scilab.org] De la part de Rafael Guerra Envoy? : jeudi 26 mai 2016 13:27 ? : 'Users mailing list for Scilab' Objet : Re: [Scilab-users] [EXTERNAL] Re: Vectorization issue Hi Paul, 'b' seems to be already used in the Km and Km2 formulas and so, it cannot be used at the same time as an auxiliary variable with different meaning. Only 'b' needs to be changed. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Carrico, Paul Sent: Thursday, May 26, 2016 12:38 PM To: 'Users mailing list for Scilab' > Subject: Re: [Scilab-users] [EXTERNAL] Re: Vectorization issue Thanks Rafael for the answer One explanation of the error is that I used a and b letter instead of aa and bb in your example; your code, if I change aa -> a and bb -> it fails again ... why ? (I do not understand) De : users [mailto:users-bounces at lists.scilab.org] De la part de Rafael Guerra Envoy? : jeudi 26 mai 2016 12:26 ? : 'Users mailing list for Scilab' Objet : [EXTERNAL] Re: [Scilab-users] Vectorization issue Hi Paul, It seems that there may be some issues with the .*, .^ syntax and also the use of the same variable in different context (b). Editing the vectorization part of your code as follows: // using vectorization aa = [0:n]'; bb = ones(n,1); i = aa.*.bb; j = bb.*.aa; Km2 = zeros(n*(n+1),1); Km2 = %pi^6*((2*i+1).^2 .* j.^2).*((2*i+1).^2.*(b/2*d)^2 + j.^2) ; Km2 = (144*(b/d).^4)/ sum(Km2); Km2 = 1.2 + (nu/(1+nu))*Km2; k2 = 1/Km2 produces: k = 0.8333090 k2 = 0.8333333 A small difference. I did not check the formulas but it might be numerical error only. Regards, Rafael From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of Carrico, Paul Sent: Thursday, May 26, 2016 11:30 AM To: International users mailing list for Scilab. (users at lists.scilab.org) > Subject: [Scilab-users] Vectorization issue Dear I failed in using vectorization in the example immediately bellow; but I do not remember if it's possible : any advice ? Thanks Paul ############################ mode(0) n = 20 Km = 0; b = 100; d = 20; nu = 0.3; // using loops for i = 0 : n for j = 1 : n Km = Km + (144*(b/d)^4)/( %pi^6*(2*i+1)^2*j^2*((2*i+1)^2*(b/2*d)^2+j^2) ); end end Km = 1.2 + (nu/(1+nu))*Km k = 1/Km // using vectorization a = [0:n]'; b = ones(n,1); i = a.*.b; j = b.*.a; Km2 = zeros(n*(n+1),1); Km2 = ( %pi.^6*((2*i+1).^2. * j.^2)*((2*. i+1).^2*(b/2*d).^2 + j^2) ) Km2 = (144*(b/d).^4)/ Km2 Km2 = 1.2 + (nu/(1+nu))*Km2 k2 = 1/Km2 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sridharreddyyedla at gmail.com Mon May 30 08:22:27 2016 From: sridharreddyyedla at gmail.com (Sridhar Reddy) Date: Sun, 29 May 2016 23:22:27 -0700 (MST) Subject: [Scilab-users] How do I access structure elements in called function? Message-ID: <1464589347920-4034130.post@n3.nabble.com> I have a structure with two fields and I am passing this structure to a function. How to access elements of this structure in the called function? %Scilab consoleS=struct('day',30,'month','may');fun(S);%called functionfunction fun(element) fields=fieldnames(element); disp(element.fields(1)); disp(element.fields(2));endfunction; I tried bit differently,like disp(element.*(*fields(1)*)*);disp(element.*(*fields(2)*)*); and changed '()' to '{}' and '[]',but none of them given me the output I requiredIs there any way to do this?thanks in advance =) -- View this message in context: http://mailinglists.scilab.org/How-do-I-access-structure-elements-in-called-function-tp4034130.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.bignier at scilab-enterprises.com Mon May 30 08:45:34 2016 From: paul.bignier at scilab-enterprises.com (Paul Bignier) Date: Mon, 30 May 2016 08:45:34 +0200 Subject: [Scilab-users] How do I access structure elements in called function? In-Reply-To: <1464589347920-4034130.post@n3.nabble.com> References: <1464589347920-4034130.post@n3.nabble.com> Message-ID: <574BE18E.4050703@scilab-enterprises.com> Hello Sridhar, You may either use "element(fields(1))" or "element('day')" or "element.day" to extract your field. Regards, Paul On 05/30/2016 08:22 AM, Sridhar Reddy wrote: > S=struct('day',30,'month','may'); > fun(S); -- 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