From antoine.elias at scilab-enterprises.com Mon Jul 3 11:04:57 2017 From: antoine.elias at scilab-enterprises.com (Antoine ELIAS) Date: Mon, 3 Jul 2017 11:04:57 +0200 Subject: [Scilab-users] addinter: Unknown error depending on scilab build In-Reply-To: <1498733757773-4036706.post@n3.nabble.com> References: <1498698621899-4036699.post@n3.nabble.com> <1498733757773-4036706.post@n3.nabble.com> Message-ID: Hello Erik, SCI/bin is in library path when Scilab is running but DW can not know that. Please, do not copy Scilab dlls in your dll path, Scilab dlls have another dependencies that can not be resolved. Can you explain us your initial trouble ? Antoine Le 29/06/2017 ? 12:55, E_Ben a ?crit : > I analysed my dlls in dependency walker, and it seems that some scilab dlls > cannot be found (see screenshot attached below, the dll names are: ast.dll, > libintl.dll, output_stream.dll). They are actually located in the SCI/bin > folder. When I copy them into the folder where my dll is, still many > dependent dlls also located in SCI/bin are not found by dependency walker. > So, it seems that the scilab installations on which the dll can be loaded > find the scilab dlls in SCI/bin, but those which cause an error don't find > them. Any ideas what I can do instead of copying all dlls from the SCI/bin > folder to the folder where my dll is? > > depwalk.png > > > > > -- > View this message in context: http://mailinglists.scilab.org/addinter-Unknown-error-depending-on-scilab-build-tp4036699p4036706.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 From sgougeon at free.fr Tue Jul 4 22:35:33 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 4 Jul 2017 22:35:33 +0200 Subject: [Scilab-users] SEP: upgrading weekday() Message-ID: <86cc21bb-bded-2e3a-0169-11004bb3e609@free.fr> Dear co-scilabers, A bug report recently posted about the weekday() function invites me to propose to upgrade this simple function. Presently, weekday() accepts only one poorly explicit numerical date format. By the way, when it is requested, it is currently not possible to get the day name in en_US language as a standard. Only the locale version is returned. A proposal to extend weekday() is attached. It is also available on the Scilab wiki: https://wiki.scilab.org/SEP/2017%20-%20weekday()%20uppgrade Any comment and input is welcome. Regards Samuel Gougeon -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SEP_2017_weekday_Wiki.pdf Type: application/pdf Size: 31746 bytes Desc: not available URL: From cnee1 at uw.edu Fri Jul 7 17:55:08 2017 From: cnee1 at uw.edu (cnee1) Date: Fri, 7 Jul 2017 08:55:08 -0700 (MST) Subject: [Scilab-users] Having issues loading .TXT file Message-ID: <1499442908912-4036730.post@n3.nabble.com> I have a large matrix from a .txt file. In Matlab the command is: fname='MRS101916sr007_r70'; ext='.txt'; data=load([fname,ext]); snum='MRS101916sr0117'; What would it be in Scilab? I have used some functions but am confused, I saw a youtube tutorial: https://www.youtube.com/watch?v=mY7EBULfJzY However, when I tried this the result was nothing because it was unable to open my matrix. My matrix will be a large n x 6 matrix. n = data points that may exceed 400,000... Much appreciated. -- View this message in context: http://mailinglists.scilab.org/Having-issues-loading-TXT-file-tp4036730.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From rouxph.22 at gmail.com Fri Jul 7 23:25:46 2017 From: rouxph.22 at gmail.com (philippe) Date: Fri, 7 Jul 2017 23:25:46 +0200 Subject: [Scilab-users] Having issues loading .TXT file In-Reply-To: <1499442908912-4036730.post@n3.nabble.com> References: <1499442908912-4036730.post@n3.nabble.com> Message-ID: Hi, Le 07/07/2017 ? 17:55, cnee1 a ?crit : > I have a large matrix from a .txt file. > > In Matlab the command is: > > fname='MRS101916sr007_r70'; > ext='.txt'; > data=load([fname,ext]); > > snum='MRS101916sr0117'; > > > What would it be in Scilab? use "mgetl" as below : fname='MRS101916sr007_r70'; ext='.txt'; data=mgetl(fname+ext); data will be a vector of strings (nx1 matrix) where each line of fname is a string of dat). The "load" function loads scilab variables saved in a binary file with .sod extension. try "help load" in the scilab console to get more informations. > > My matrix will be a large n x 6 matrix. n = data points that may exceed > 400,000... if you want to read a matrix from a text file you should use "fscanfMat" see "help fscanfMat" and "help scanf_conversion" in scilab console for more information . Philippe From hagiwara at econ.kobe-u.ac.jp Sat Jul 8 04:13:15 2017 From: hagiwara at econ.kobe-u.ac.jp (Taiji HAGIWARA) Date: Sat, 8 Jul 2017 11:13:15 +0900 Subject: [Scilab-users] sparse in Scilab 6.0.0 Message-ID: <524d02f4-51f8-1f2e-afe6-c961716bc6e8@econ.kobe-u.ac.jp> Dear all, I have a question on "sparse" function in ver.6.0.0 Sparse function in ver.6.0.0 returns different answer compared to ver.5.2.2. I am using Scilab 6.0.0 on Windows 10 (64bit) When we set same (i,j) factor twice or more, ie. ij=[i1,j1; i1,j1] v=[a1; a2] Scilab 5.5.2 used to return the sum of corresponding value, a1+a2. But Scilab 6.0.0 now returns the last entry, a2. Is it a bug? Otherwise, is it a intended revision? [example] ij=[1,2;1,2];v =[1;2];sp=sparse(ij,v) -------------------------- [Scilab 5.5.2] -------------------------- -->sp=sparse(ij,v) sp = ( 1, 2) sparse matrix ( 1, 2) 3. <---1+2 -------------------------- [Scilab 6.6.0] -------------------------- --> sp=sparse(ij,v) sp = ( 1, 2) sparse matrix ( 1, 2) 2. <--- 2 only. 1 is ignored -- ???? ?????????? ?657-8501??????????2-1 Taiji Hagiwara Professor Graduate School of Economics Kobe University 2-1 Rokkodai, Nada, Kobe 657-8501, Japan tel/fax +81-78-803-6848 From bruno.pincon at univ-lorraine.fr Sat Jul 8 10:00:19 2017 From: bruno.pincon at univ-lorraine.fr (=?UTF-8?Q?Pin=c3=a7on_Bruno?=) Date: Sat, 8 Jul 2017 10:00:19 +0200 Subject: [Scilab-users] sparse in Scilab 6.0.0 In-Reply-To: <524d02f4-51f8-1f2e-afe6-c961716bc6e8@econ.kobe-u.ac.jp> References: <524d02f4-51f8-1f2e-afe6-c961716bc6e8@econ.kobe-u.ac.jp> Message-ID: <7b6a5317-56cd-b48a-7c97-5de8dde8c421@univ-lorraine.fr> Le 08/07/2017 ? 04:13, Taiji HAGIWARA a ?crit : > Dear all, > > I have a question on "sparse" function in ver.6.0.0 > Sparse function in ver.6.0.0 returns different answer compared to > ver.5.2.2. I am using Scilab 6.0.0 on Windows 10 (64bit) > > When we set same (i,j) factor twice or more, > ie. > ij=[i1,j1; > i1,j1] > v=[a1; > a2] > > Scilab 5.5.2 used to return the sum of corresponding value, a1+a2. > But Scilab 6.0.0 now returns the last entry, a2. > > Is it a bug? > Otherwise, is it a intended revision? Hi all, If it is the case, it's for sure a very bad idea : the sum feature of the sparse function is used to build finite element matrices fastly in those softwares (matlab like). At least the usual behavior could be changed by an additionnal option parameter (with the default set to get the old behavior). hth Bruno From stephane.mottelet at utc.fr Sat Jul 8 10:47:26 2017 From: stephane.mottelet at utc.fr (=?utf-8?Q?St=C3=A9phane_Mottelet?=) Date: Sat, 8 Jul 2017 10:47:26 +0200 Subject: [Scilab-users] sparse in Scilab 6.0.0 In-Reply-To: <7b6a5317-56cd-b48a-7c97-5de8dde8c421@univ-lorraine.fr> References: <524d02f4-51f8-1f2e-afe6-c961716bc6e8@econ.kobe-u.ac.jp> <7b6a5317-56cd-b48a-7c97-5de8dde8c421@univ-lorraine.fr> Message-ID: <7A995C29-D9DC-4A8D-AA87-5A8A0CF660C6@utc.fr> Hello, Sure, this is an UGLY regression which will break a lot of already written code. As far as I am concerned it definitely prevents the port of one of my contribs to 6.0... S. > Le 8 juil. 2017 ? 10:00, Pin?on Bruno a ?crit : > >> Le 08/07/2017 ? 04:13, Taiji HAGIWARA a ?crit : >> Dear all, >> >> I have a question on "sparse" function in ver.6.0.0 >> Sparse function in ver.6.0.0 returns different answer compared to ver.5.2.2. I am using Scilab 6.0.0 on Windows 10 (64bit) >> >> When we set same (i,j) factor twice or more, >> ie. >> ij=[i1,j1; >> i1,j1] >> v=[a1; >> a2] >> >> Scilab 5.5.2 used to return the sum of corresponding value, a1+a2. >> But Scilab 6.0.0 now returns the last entry, a2. >> >> Is it a bug? >> Otherwise, is it a intended revision? > > Hi all, > > If it is the case, it's for sure a very bad idea : the sum feature > of the sparse function is used to build finite element matrices fastly > in those softwares (matlab like). At least the usual behavior could be > changed by an additionnal option parameter (with the default set to > get the old behavior). > > hth > Bruno > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Sat Jul 8 19:09:13 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sat, 8 Jul 2017 19:09:13 +0200 Subject: [Scilab-users] sparse in Scilab 6.0.0 In-Reply-To: <7b6a5317-56cd-b48a-7c97-5de8dde8c421@univ-lorraine.fr> References: <524d02f4-51f8-1f2e-afe6-c961716bc6e8@econ.kobe-u.ac.jp> <7b6a5317-56cd-b48a-7c97-5de8dde8c421@univ-lorraine.fr> Message-ID: <44a22df0-17b0-e1bf-d36e-158301284d5f@free.fr> Hi, Le 08/07/2017 ? 10:00, Pin?on Bruno a ?crit : > Le 08/07/2017 ? 04:13, Taiji HAGIWARA a ?crit : >> Dear all, >> >> I have a question on "sparse" function in ver.6.0.0 >> Sparse function in ver.6.0.0 returns different answer compared to >> ver.5.2.2. I am using Scilab 6.0.0 on Windows 10 (64bit) >> >> When we set same (i,j) factor twice or more, >> ie. >> ij=[i1,j1; >> i1,j1] >> v=[a1; >> a2] >> >> Scilab 5.5.2 used to return the sum of corresponding value, a1+a2. >> But Scilab 6.0.0 now returns the last entry, a2. >> >> Is it a bug? >> Otherwise, is it a intended revision? > > Hi all, > > If it is the case, it's for sure a very bad idea : the sum feature > of the sparse function is used to build finite element matrices fastly > in those softwares (matlab like). At least the usual behavior could be > changed by an additionnal option parameter (with the default set to > get the old behavior). From a general non-sparse and non-finite-element point of view, this feature looks like a hack. Now, it has never been documented in Scilab. Then, it was considered and reported as a bug @ http://bugzilla.scilab.org/7675 If apparently it needs to be restored, it clearly needs to be documented, and actually asks for an option. Could you -- Bruno and Stephane -- comment the report please? Thanks. Samuel From stephane.mottelet at utc.fr Sat Jul 8 19:47:50 2017 From: stephane.mottelet at utc.fr (=?UTF-8?Q?St=c3=a9phane_Mottelet?=) Date: Sat, 8 Jul 2017 19:47:50 +0200 Subject: [Scilab-users] sparse in Scilab 6.0.0 In-Reply-To: <44a22df0-17b0-e1bf-d36e-158301284d5f@free.fr> References: <524d02f4-51f8-1f2e-afe6-c961716bc6e8@econ.kobe-u.ac.jp> <7b6a5317-56cd-b48a-7c97-5de8dde8c421@univ-lorraine.fr> <44a22df0-17b0-e1bf-d36e-158301284d5f@free.fr> Message-ID: <27189092-a706-508b-e2f0-cd541010bc56@utc.fr> Please read the Matlab's help page for sparse at https://fr.mathworks.com/help/matlab/ref/sparse.html : S = sparse(i,j,v) generates a sparse matrix S from the triplets i, j, and v such that S(i(k),j(k)) = v(k). The max(i)-by-max(j) output matrix has space allotted for length(v) nonzero elements._*sparse adds together elements in v that have duplicate subscripts in i and j.*__* *_ Scilab devs have always wanted to have no strings attached to Matlab conventions. Sometimes this has been a good idea, but here this is definitely not the case... S. Le 08/07/2017 ? 19:09, Samuel Gougeon a ?crit : > Hi, > > Le 08/07/2017 ? 10:00, Pin?on Bruno a ?crit : >> Le 08/07/2017 ? 04:13, Taiji HAGIWARA a ?crit : >>> Dear all, >>> >>> I have a question on "sparse" function in ver.6.0.0 >>> Sparse function in ver.6.0.0 returns different answer compared to >>> ver.5.2.2. I am using Scilab 6.0.0 on Windows 10 (64bit) >>> >>> When we set same (i,j) factor twice or more, >>> ie. >>> ij=[i1,j1; >>> i1,j1] >>> v=[a1; >>> a2] >>> >>> Scilab 5.5.2 used to return the sum of corresponding value, a1+a2. >>> But Scilab 6.0.0 now returns the last entry, a2. >>> >>> Is it a bug? >>> Otherwise, is it a intended revision? >> >> Hi all, >> >> If it is the case, it's for sure a very bad idea : the sum feature >> of the sparse function is used to build finite element matrices >> fastly >> in those softwares (matlab like). At least the usual behavior >> could be >> changed by an additionnal option parameter (with the default set to >> get the old behavior). > > From a general non-sparse and non-finite-element point of view, this > feature looks like a hack. > Now, it has never been documented in Scilab. Then, it was considered > and reported as a bug > @ http://bugzilla.scilab.org/7675 > If apparently it needs to be restored, it clearly needs to be > documented, and actually asks > for an option. Could you -- Bruno and Stephane -- comment the report > please? > > Thanks. > Samuel > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruno.pincon at univ-lorraine.fr Sat Jul 8 19:54:27 2017 From: bruno.pincon at univ-lorraine.fr (=?UTF-8?Q?Pin=c3=a7on_Bruno?=) Date: Sat, 8 Jul 2017 19:54:27 +0200 Subject: [Scilab-users] sparse in Scilab 6.0.0 In-Reply-To: <44a22df0-17b0-e1bf-d36e-158301284d5f@free.fr> References: <524d02f4-51f8-1f2e-afe6-c961716bc6e8@econ.kobe-u.ac.jp> <7b6a5317-56cd-b48a-7c97-5de8dde8c421@univ-lorraine.fr> <44a22df0-17b0-e1bf-d36e-158301284d5f@free.fr> Message-ID: <27f847ee-cacb-9c33-63cd-1135589803ee@univ-lorraine.fr> Le 08/07/2017 ? 19:09, Samuel Gougeon a ?crit : > > From a general non-sparse and non-finite-element point of view, this > feature looks like a hack. > Now, it has never been documented in Scilab. Then, it was considered > and reported as a bug > @ http://bugzilla.scilab.org/7675 > If apparently it needs to be restored, it clearly needs to be > documented, and actually asks > for an option. Could you -- Bruno and Stephane -- comment the report > please? Hi Samuel, I don't remind my login/pass so I will let Stephane do it. In fact there are several cases where this feature is useful (not only building fem matrices). I remember coding a 2d histogram (or something like that) in an efficient way thanks to it. It belongs to those special tricks in matlab-like softwares which make it possible to speed-up some algorithmic operations. I understand it looks quite strange the first time and I don't know why it iwas not documented... Bruno From gnelson.zynrgy at gmail.com Tue Jul 11 03:57:58 2017 From: gnelson.zynrgy at gmail.com (PorpoiseSeeker) Date: Mon, 10 Jul 2017 18:57:58 -0700 Subject: [Scilab-users] can not create Scilab Java Main_Class after installation of SL 5.5.0.32 on windows 7 In-Reply-To: <5012af39-429a-6ef3-5b6c-3ab518c158d2@durietz.se> References: <1440326479863-4032713.post@n3.nabble.com> <1498411303270-4036657.post@n3.nabble.com> <5012af39-429a-6ef3-5b6c-3ab518c158d2@durietz.se> Message-ID: <4496DE0B-0F3F-4EFD-A89F-40D9E0AA5615@gmail.com> Has this been solved? I was about to transfer to Win7 from MacOS, but need to know if that is feasible Thanks Gary Nelson 'There are two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle.' Albert Einstein (1879-1955) > On Jun 29, 2017, at 1:55 AM, Stefan Du Rietz wrote: > > Is there any solution for this with Windows 7 Professional? Or only a switch to Ubuntu after the kernel has been fixed ... ;-) > > Regards > Stefan > > > On 2017-06-25 23:10, Stefan Du Rietz wrote: >> I have the same problem. I have uninstalled 6.0 and have then several times uninstalled Scilab 5.5.2, deleted SCIHOME and reinstalled Scilab 5.5.2, which worked before(!), to no avail ... >> /Stefan >> On 2017-06-25 19:21, rlandersen wrote: >>> I have the same problem. >>> When I try to launch Scilab I get the the same error message described. >>> >>> I had Scilab 5.5.2 installed and working when the problem started. >>> >>> I tried uninstalling and installing version 6.00. >>> Same error. >>> >>> Even deleting ........\AppData\Roaming\Scilab\ >>> Still does not work. >>> >>> How can I proceed? >>> >>> >>> >>> >>> >>> >>> >>> -- >>> View this message in context: http://mailinglists.scilab.org/Scilab-users-can-not-create-Scilab-Java-Main-Class-after-installation-of-SL-5-5-0-32-on-windows-7-tp4030309p4036657.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 > _______________________________________________ > 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 Jul 12 15:55:21 2017 From: shamika.i.nair at gmail.com (Shamika Mohanan) Date: Wed, 12 Jul 2017 19:25:21 +0530 Subject: [Scilab-users] Convert struct to mlist/tlist Message-ID: Hello, I'm using Scilab 5.5.0. How do I convert a struct to an mlit/tlist in Scilab code? For example, I have created a struct using date_st=struct('day',25,'month' ,'DEC','year',2006) Is there any way to get the number of fields in the struct so that I can loop over the struct? I want to do this operation for a struct with unknown number of fields and values. Regards, Shamika -------------- next part -------------- An HTML attachment was scrubbed... URL: From shamika.i.nair at gmail.com Wed Jul 12 16:40:27 2017 From: shamika.i.nair at gmail.com (Shamika Mohanan) Date: Wed, 12 Jul 2017 20:10:27 +0530 Subject: [Scilab-users] Difference between pvApiCtx and scilabEnv Message-ID: Hello, I'm using Scilab 6.0.0 API. What is the difference between pvApiCtx and scilabEnv? When I compile C++ code on Scilab 6.0.0 using pvApiCtx, I get the following error- error: 'pvApiCtx' was not declared in this scope int z=nbInputArgument(pvApiCtx); ^ /home/scilab-6.0.0/share/scilab/../../include/scilab/api_stack_common.h:64:53: note: in definition of macro 'nbInputArgument' #define nbInputArgument(PVCTX) (*getNbInputArgument(PVCTX)) If I replace pvApiCtx with scilabEnv, I get the following error- /home/scilab-6.0.0/share/scilab/../../include/scilab/api_stack_common.h:64:58: error: expected primary-expression before ')' token #define nbInputArgument(PVCTX) (*getNbInputArgument(PVCTX)) How do I resolve this error for Scilab 6.0.0? Regards, Shamika -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Wed Jul 12 19:15:16 2017 From: sgougeon at free.fr (sgougeon at free.fr) Date: Wed, 12 Jul 2017 19:15:16 +0200 (CEST) Subject: [Scilab-users] Convert struct to mlist/tlist In-Reply-To: Message-ID: <1896452939.970658.1499879716571.JavaMail.root@zimbra75-e12.priv.proxad.net> Hello Shamikan, A (array of) structures IS a mlist. The list of defined fields is returned by fieldnames(): --> s.b = %t; --> s.r = %pi; --> s.p = %z s = b: [1x1 boolean] r: [1x1 constant] p: [1x1 polynomial] --> fieldnames(s) ans = !b ! ! ! !r ! ! ! !p ! And the number of fields: --> size(fieldnames(s),1) ans = 3. Regards Samuel Gougeon From christoph.knappe at gmail.com Thu Jul 13 15:33:55 2017 From: christoph.knappe at gmail.com (christophk) Date: Thu, 13 Jul 2017 06:33:55 -0700 (MST) Subject: [Scilab-users] problems with "mtlb_mode" variable when porting scilab 5.6 code to scilab 6.0 Message-ID: <1499952835147-4036751.post@n3.nabble.com> Hi there, I used to program in a matlab environment and made a small script some time ago that handles multiple files using "mtlb_dir". I am dealing with Excel files and found out along the way that Scilab 5.6 couldn't handle to read the new xlsx-format. (not sure whether that changed with the update to scilab 6.0). This is why I ended up writing the following code example to clear all xlsx files from the mtlb_dir list I originally created. The code worked perfectly fine before but since I upgraded to Scilab 6.0 it started to throw an error description of "Unknown field: dims". Here is a code example to reproduce the error. The datapath actually needs to contain one or more xls-files to end up throwing errors: datapath = "C:\"; files = mtlb_dir(datapath + "*.xls"); exception = "xlsx"; j=0; newfiles = []; for i=1:size(files.name) // == T if the current file is not xlsx if isempty(strindex(files(i).name,exception)) j=j+1; newfiles(j) = files(i); end end I realized that "files" is of type struct(Mlist) whilst i create an empty "newfiles" as a double. That seems to be fine, however as long as I do a unindexed definition such as newfiles = files(i); I do not quite realise why that is the case. So I tried to solve this problem by writing "newfiles = struct;" or "newfiles = mlist;" for an empty file allocation instead of just "newfiles = []";. But that ends up giving me a variable type 130 instead of the type 17 I was aiming for. Finally, I came up with a dirty workaround that I find very unsatisfying: I've done an if-case exception. So instead of writing newfiles(j) = files(i); I made the following changes inside the code: if j == 1 newfiles = files(i); else newfiles(j) = files(i); end This works for fine for j == 1 but instead thows a different error as I arrive at j = 2: "Undefined variable: mtlb_mode" This is where I got stuck. I know I probably shouldn't use the "mtlb_dir" function as Scilab is moving away from being a matlab clone. However, I already built a huge code framework that is totally reliant on the structure that is supplied by the mtlb_dir command. In other words, I'd rather go back to Scilab 5.6 right now instead of having to go through hundreds of lines of code to get the rest of my scripts working with another file handling approach. Please help! Best regards, Christoph -- View this message in context: http://mailinglists.scilab.org/problems-with-mtlb-mode-variable-when-porting-scilab-5-6-code-to-scilab-6-0-tp4036751.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From Clement.David at esi-group.com Mon Jul 17 10:12:31 2017 From: Clement.David at esi-group.com (=?utf-8?B?Q2zDqW1lbnQgRGF2aWQ=?=) Date: Mon, 17 Jul 2017 08:12:31 +0000 Subject: [Scilab-users] Difference between pvApiCtx and scilabEnv In-Reply-To: References: Message-ID: <1500279149.779.11.camel@esi-group.com> Hello Shamika, Scilab 6 C API only use scilabEnv variable ; pvApiCtx is used for Scilab 5 and 6 stack-like C API. Mixing API should be avoided, if you are porting from 5 to 6 and require some 6 features (mlist, struct, high-performance, etc..) I suggest you to only use the new 6 API ! Thanks, -- Cl?ment Le mercredi 12 juillet 2017 ? 20:10 +0530, Shamika Mohanan a ?crit?: > Hello, > > I'm using Scilab 6.0.0 API. What is the difference between pvApiCtx and scilabEnv? When I compile > C++ code on Scilab 6.0.0 using pvApiCtx, I get the following error- > > error: 'pvApiCtx' was not declared in this scope > ???? int z=nbInputArgument(pvApiCtx); > ?????????????????????????? ^ > /home/scilab-6.0.0/share/scilab/../../include/scilab/api_stack_common.h:64:53: note: in definition > of macro 'nbInputArgument' > ?#define nbInputArgument(PVCTX) (*getNbInputArgument(PVCTX)) > > If I replace pvApiCtx with scilabEnv, I get the following error- > > /home/scilab-6.0.0/share/scilab/../../include/scilab/api_stack_common.h:64:58: error: expected > primary-expression before ')' token > ?#define nbInputArgument(PVCTX) (*getNbInputArgument(PVCTX)) > > How do I resolve this error for Scilab 6.0.0? > > Regards, > Shamika > ?????????????????????????????????????????????????????????? > ?? > > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From sgougeon at free.fr Mon Jul 17 11:45:32 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Mon, 17 Jul 2017 11:45:32 +0200 Subject: [Scilab-users] Call for reviewer <= SEP: upgrading weekday() In-Reply-To: <86cc21bb-bded-2e3a-0169-11004bb3e609@free.fr> References: <86cc21bb-bded-2e3a-0169-11004bb3e609@free.fr> Message-ID: <3018f4e2-fc13-f22b-d3fd-52a59b7cb095@free.fr> Hello, The new implementation of weekday() is now pushed and available on the CodeReview: https://codereview.scilab.org/#/c/19326/ Its updated help page is attached. It now expects to be reviewed before merging. Any contributor is welcome to do so online. Thanks Best regards Samuel Gougeon Le 04/07/2017 ? 22:35, Samuel Gougeon a ?crit : > > Dear co-scilabers, > > A bug report recently posted about the weekday() function invites me > to propose to upgrade this simple function. > > Presently, weekday() accepts only one poorly explicit numerical date > format. > > By the way, when it is requested, it is currently not possible to get > the day name in en_US language as a standard. Only the locale version > is returned. > > A proposal to extend weekday() is attached. It is also available on > the Scilab wiki: > > https://wiki.scilab.org/SEP/2017%20-%20weekday()%20uppgrade > > > Any comment and input is welcome. > > Regards > Samuel Gougeo > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: weekday_en_US.pdf Type: application/pdf Size: 53642 bytes Desc: not available URL: From david.cheze at cea.fr Tue Jul 18 14:49:59 2017 From: david.cheze at cea.fr (=?UTF-8?Q?David_Ch=C3=A8ze?=) Date: Tue, 18 Jul 2017 05:49:59 -0700 (MST) Subject: [Scilab-users] scilab 6 - debug script Message-ID: <1500382199497-4036754.post@n3.nabble.com> Hi all, I wonder there is a trick to debug a script ,not a function ? My script calls functions but I would like to set breakpoints along the script not in the functions. Thanks for your advices, David -- View this message in context: http://mailinglists.scilab.org/scilab-6-debug-script-tp4036754.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From jrafaelbguerra at hotmail.com Tue Jul 18 14:59:16 2017 From: jrafaelbguerra at hotmail.com (Rafael Guerra) Date: Tue, 18 Jul 2017 12:59:16 +0000 Subject: [Scilab-users] scilab 6 - debug script In-Reply-To: <1500382199497-4036754.post@n3.nabble.com> References: <1500382199497-4036754.post@n3.nabble.com> Message-ID: What about using the command 'abort' ? -----Original Message----- From: users [mailto:users-bounces at lists.scilab.org] On Behalf Of David Ch?ze Sent: Tuesday, July 18, 2017 2:50 PM To: users at lists.scilab.org Subject: [Scilab-users] scilab 6 - debug script Hi all, I wonder there is a trick to debug a script ,not a function ? My script calls functions but I would like to set breakpoints along the script not in the functions. Thanks for your advices, David -- View this message in context: http://mailinglists.scilab.org/scilab-6-debug-script-tp4036754.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 From david.cheze at cea.fr Tue Jul 18 15:12:48 2017 From: david.cheze at cea.fr (=?UTF-8?Q?David_Ch=C3=A8ze?=) Date: Tue, 18 Jul 2017 06:12:48 -0700 (MST) Subject: [Scilab-users] Issue with Using atomsTest In-Reply-To: References: Message-ID: <1500383568442-4036756.post@n3.nabble.com> Hi Samuel, did you find a workaround to make the stixbox 2.5 module running on scilab 6 in the end? I submitted bug at bugzilla (scilab side) and on the forge (stixbox module) on this specific issue but did not receive any comments since then. Thank you, David -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Issue-with-Using-atomsTest-tp4035924p4036756.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Tue Jul 18 15:50:08 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 18 Jul 2017 15:50:08 +0200 Subject: [Scilab-users] Issue with Using atomsTest In-Reply-To: <1500383568442-4036756.post@n3.nabble.com> References: <1500383568442-4036756.post@n3.nabble.com> Message-ID: Hello David, Le 18/07/2017 ? 15:12, David Ch?ze a ?crit : > Hi Samuel, > > did you find a workaround to make the stixbox 2.5 module running on scilab 6 > in the end? I submitted bug at bugzilla (scilab side) and on the forge > (stixbox module) on this specific issue but did not receive any comments > since then. Yes: stixbox crashes because all .bin files have been removed after genlib()ing it and before packaging it as a loadable and runnable module. So, the library is well loaded by stixbox.start, but then, at the first call of any binless macro, it crashes. Workaround: Do the following once. It will then be ok forever: // after loading it: [?,path] = libraryinfo("stixboxlib"); cwd = pwd(); cd(path); genlib stixboxlib cd(cwd) and then use it as expected. Samuel -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgougeon at free.fr Tue Jul 18 15:55:55 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Tue, 18 Jul 2017 15:55:55 +0200 Subject: [Scilab-users] Issue with Using atomsTest In-Reply-To: References: <1500383568442-4036756.post@n3.nabble.com> Message-ID: <3d16c47b-1660-673d-7fd8-30779afa1a45@free.fr> Le 18/07/2017 ? 15:50, Samuel Gougeon a ?crit : > > Workaround: Do the following once. It will then be ok forever: > > // after loading it: > [?,path] = libraryinfo("stixboxlib"); > cwd = pwd(); > cd(path); > genlib stixboxlib > cd(cwd) If for you stixbox is autoloaded at startup, you need to insert the following just before genlib: predef clear -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cheze at cea.fr Tue Jul 18 16:44:43 2017 From: david.cheze at cea.fr (CHEZE David 227480) Date: Tue, 18 Jul 2017 14:44:43 +0000 Subject: [Scilab-users] Issue with Using atomsTest In-Reply-To: <3d16c47b-1660-673d-7fd8-30779afa1a45@free.fr> References: <1500383568442-4036756.post@n3.nabble.com> <3d16c47b-1660-673d-7fd8-30779afa1a45@free.fr> Message-ID: Thank you Samuel I'll have a try and let you know. David De : users [mailto:users-bounces at lists.scilab.org] De la part de Samuel Gougeon Envoy? : mardi 18 juillet 2017 15:56 ? : users at lists.scilab.org Objet : Re: [Scilab-users] Issue with Using atomsTest Le 18/07/2017 ? 15:50, Samuel Gougeon a ?crit : Workaround: Do the following once. It will then be ok forever: // after loading it: [?,path] = libraryinfo("stixboxlib"); cwd = pwd(); cd(path); genlib stixboxlib cd(cwd) If for you stixbox is autoloaded at startup, you need to insert the following just before genlib: predef clear -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.cheze at cea.fr Wed Jul 19 12:10:41 2017 From: david.cheze at cea.fr (=?UTF-8?Q?David_Ch=C3=A8ze?=) Date: Wed, 19 Jul 2017 03:10:41 -0700 (MST) Subject: [Scilab-users] Issue with Using atomsTest In-Reply-To: References: <1500383568442-4036756.post@n3.nabble.com> <3d16c47b-1660-673d-7fd8-30779afa1a45@free.fr> Message-ID: <1500459041634-4036761.post@n3.nabble.com> Hi all, to make it works actually, I needed to force the genlib. Following your recommandations: David Ch?ze wrote > // after loading it: > > [?,path] = libraryinfo("stixboxlib"); > > cwd = pwd(); > > cd(path); > > genlib stixboxlib > > cd(cwd) > > If for you stixbox is autoloaded at startup, you need to insert the > following just before genlib: > > predef clear I just replaced genlib stixbox by genlib("stixboxlib",path,%t) Thank you David -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Issue-with-Using-atomsTest-tp4035924p4036761.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From payen.pierre at gmail.com Thu Jul 20 10:01:56 2017 From: payen.pierre at gmail.com (Pierre Payen) Date: Thu, 20 Jul 2017 01:01:56 -0700 (MST) Subject: [Scilab-users] Convert struct to mlist/tlist In-Reply-To: References: Message-ID: <1500537716686-4036764.post@n3.nabble.com> Also using the getfield functions gives you the field name and the field value : //////////////////////////////////////////////////////////////////////////////////////////////////// date_st =struct('day',25,'month' ,'DEC','year',2006) // getting the field fields = fieldnames(date_st) // this is a macro, output is column of strings fields = getfield(1,date_st) // this is a primitive , output is a line of strings // but first and second field contains the type and the dims of the struct so useless fields = fields(3:$) // identical to fieldnames(date_st) // getting the value // all 3 give the same output value1=date_st(fields(1)) value1=getfield(fields(1),date_st) value1=getfield(3,date_st) // now you can nest this in a loop for i=1:size(fields,'*') value=date_st(fields(i)) value=getfield(fields(i),date_st) value=getfield(2+i,date_st) end // BONUS : with getfield, you can get the value inside nested structures when you dont know the field name time_st = struct('date',date_st) fields = fieldnames(time_st) for j = 1:size(fields,'*') subfields = fieldnames(time_st(fields(j))) for i = 1:size(subfields,'*') value=getfield(subfields(i),getfield(fields(j),time_st)) end end //////////////////////////////////////////////////////////////////////////////// -- View this message in context: http://mailinglists.scilab.org/Scilab-users-Convert-struct-to-mlist-tlist-tp4036747p4036764.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. From sgougeon at free.fr Thu Jul 20 12:23:32 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Thu, 20 Jul 2017 12:23:32 +0200 Subject: [Scilab-users] Convert struct to mlist/tlist In-Reply-To: <1500537716686-4036764.post@n3.nabble.com> References: <1500537716686-4036764.post@n3.nabble.com> Message-ID: <41888624-145f-a5ae-da82-a1c805e63e86@free.fr> Hello, Le 20/07/2017 ? 10:01, Pierre Payen a ?crit : > .../... > > // BONUS : with getfield, you can get the value inside nested structures > when you dont know the field name > time_st = struct('date',date_st) > > fields = fieldnames(time_st) > for j = 1:size(fields,'*') > subfields = fieldnames(time_st(fields(j))) > for i = 1:size(subfields,'*') > value=getfield(subfields(i),getfield(fields(j),time_st)) > end > end This is possible as well with fieldnames(). With the following, we print a 2-level nested structure. To generalize to any nesting depth, the "else" should become recursive. date_st = struct('day',25,'month' ,'DEC','year',2006); event = struct('date',date_st, "place","Paris"); fevent = fieldnames(event); for f = fevent' v = event(f); sfields = fieldnames(v); if sfields==[] printf("%s: %s\n", f, sci2exp(v)); else for s = sfields' printf("%s.%s: %s\n", f, s, sci2exp(v(s))); end end end --> date.day: 25 date.month: "DEC" date.year: 2006 place: "Paris" --> From rouxph.22 at gmail.com Sun Jul 23 11:43:26 2017 From: rouxph.22 at gmail.com (philippe) Date: Sun, 23 Jul 2017 11:43:26 +0200 Subject: [Scilab-users] overloading size for tlist Message-ID: Hi to all, I've created a new type "mytype", represented by tlist, and another type "matrixmytype", for matrix of "mytype" object, represented by mlist . I've created the function %matrixmytype_size to overload the function "size" for "matrixmytype" objects (it works fine) . For compatibility reason I would like that size(x), where typeof(x)=='mytype', retrieve the value [1,1], but actually size(x) return the size of the tlist for x an "mytype" . Let's take a minimal example : //***************************************************** function x=mytype() x=tlist(['mytype' 'tab' 'pol' 'str'],.. grand(2,3,'uin',1,3), .. //x.tab poly(0,'x'), .. //x.pol 'scilab') //x.str endfunction function [p,n]=%mytype_size(x) [p,n]=size(x.tab) endfunction //****************************************************** then in scilab console : //*********************************** -->x=mytype() x = x(1) !mytype tab pol str ! x(2) 1. 3. 1. 2. 1. 2. x(3) x x(4) scilab -->[p,n]=%mytype_size(x) // this is the expected result for size(x) n = 3. p = 2. -->[p,n]=size(x) !--error 39 Nombre erron? d'arguments d'entr?e. -->size(x) ans = 4. //**************************************************** My goal is only to ensure overloading compatibility between mytype and matrixmytype like for "double" size(x) returns [1,1] if x is a scalar and not a matrix. Thank's for reading ! Philippe From sgougeon at free.fr Sun Jul 23 14:09:49 2017 From: sgougeon at free.fr (Samuel Gougeon) Date: Sun, 23 Jul 2017 14:09:49 +0200 Subject: [Scilab-users] overloading size for tlist In-Reply-To: References: Message-ID: <5f4edcf9-c9cf-2a30-9be3-39fd628fe41b@free.fr> Hello Philippe, In Scilab 5, size() is overloadable only for mlist(), not for tlist(). In Scilab 6, it is overloadable for foth. So, to be compatible with both Scilab 5 and 6, you shall define your object as a mlist instead of tlist. Best regards Samuel Le 23/07/2017 ? 11:43, philippe a ?crit : > Hi to all, > > I've created a new type "mytype", represented by tlist, and another type > "matrixmytype", for matrix of "mytype" object, represented by mlist . > I've created the function %matrixmytype_size to overload the function > "size" for "matrixmytype" objects (it works fine) . For compatibility > reason I would like that size(x), where typeof(x)=='mytype', retrieve > the value [1,1], but actually size(x) return the size of the tlist for x > an "mytype" . > > Let's take a minimal example : > > //***************************************************** > function x=mytype() > x=tlist(['mytype' 'tab' 'pol' 'str'],.. > grand(2,3,'uin',1,3), .. //x.tab > poly(0,'x'), .. //x.pol > 'scilab') //x.str > endfunction > > function [p,n]=%mytype_size(x) > [p,n]=size(x.tab) > endfunction > //****************************************************** > > then in scilab console : > > > //*********************************** > -->x=mytype() > x = > > > x(1) > > !mytype tab pol str ! > > x(2) > > 1. 3. 1. > 2. 1. 2. > > x(3) > > x > > x(4) > > scilab > > > -->[p,n]=%mytype_size(x) // this is the expected result for size(x) > n = > > 3. > p = > > 2. > > -->[p,n]=size(x) > !--error 39 > Nombre erron? d'arguments d'entr?e. > > > -->size(x) > ans = > > 4. > > //**************************************************** > > > My goal is only to ensure overloading compatibility between mytype and > matrixmytype like for "double" size(x) returns [1,1] if x is a scalar > and not a matrix. > > Thank's for reading ! > > Philippe > > _______________________________________________ > users mailing list > users at lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users From rouxph.22 at gmail.com Sun Jul 23 15:21:47 2017 From: rouxph.22 at gmail.com (philippe) Date: Sun, 23 Jul 2017 15:21:47 +0200 Subject: [Scilab-users] overloading size for tlist In-Reply-To: <5f4edcf9-c9cf-2a30-9be3-39fd628fe41b@free.fr> References: <5f4edcf9-c9cf-2a30-9be3-39fd628fe41b@free.fr> Message-ID: Le 23/07/2017 ? 14:09, Samuel Gougeon a ?crit : > Hello Philippe, > > In Scilab 5, size() is overloadable only for mlist(), not for tlist(). > In Scilab 6, it is overloadable for foth. > So, to be compatible with both Scilab 5 and 6, you shall define your > object as a mlist instead of tlist. thank's Samuel, I was suspecting that the problem was coming from tlist. I changed "mytype" to mlist instead of tlist and all works fine. So now I don't understand what are tlist made for ? I was thinking that mlist was dedicated to "matrix of tlist" but we can use mlist for both matrix/non-matrix , it should be clarified ... By, Philippe