[Scilab-users] sparse in Scilab 6.0.0
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 ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Having issues loading .TXT file
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 ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
[Scilab-users] Having issues loading .TXT file
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. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users