Problems using part() function in Scilab 2026.0.1

Dear Scilab community,

I am a newcomer to Scilab, as I am working with a colleague who has given me a .sce file. I have installed Scilab 2026.0.1 via Flatpak under Fedora Linux 43.

My problem concerns the $ syntax in the part() function in that script. I have consulted the official documentation and that example is working:

--> part(['a string' 'another longer one'], $-2:$ )

ans = [1x2 string]

"ing"  "one"

When I am running my script, the line 123 txt=part(txt, 1:$-1); fails (the variable txt was just read from a multilines textfile by txt=mgetl(file_name);):

--> exec('/blabla/myscript.sce', -1)
   0.3815789
in builtin                part 
at line   123 of executed file /blabla/myscript.sce

Function not defined for given argument type(s),
  check arguments or define function %ip_part for overloading.

But still stranger, after that, the official example now also fails:

--> part(['a string' 'another longer one'], $-2:$ ) 
in builtin                part 

Function not defined for given argument type(s),
  check arguments or define function %ip_part for overloading.

That problem does not occur if I install Scilab 2025.1.0 using the scilab-2025.1.0.bin.x86_64-linux-gnu.tar.xz archive (but in that version I have big trouble trying to install the ATOMS IPCV, but that it is another story…).

Am I missing something? Or is it a bug?

This is a minimalist snippet showing my problem in 2026.0.1:

clear

Mat=zeros(6, 400)

file_name="~/output.txt"
fprintfMat(file_name, Mat)

txt=mgetl(file_name)    // reading that output file

txt=part(txt, 1:$-1)    // delete the last character of each line

Interactive console (GUI):

--> part(['a string' 'another longer one'], $-2:$ ) 

 ans = [1x2 string]

  "ing"  "one"

--> exec('blabla/bug.sce', -1)
in builtin                part 
at line    10 of executed file blabla/bug.sce

Function not defined for given argument type(s),
  check arguments or define function %ip_part for overloading.

--> part(['a string' 'another longer one'], $-2:$ ) 
in builtin                part 

Function not defined for given argument type(s),
  check arguments or define function %ip_part for overloading.

Hello,

We did not manage to reproduce this issue.

Can you try with a Scilab official binary version from Scilab 2026.0.1 | Scilab ?

Best regards.

1 Like

Thanks a lot @vincent.couvert !

I really thought Flatpak would be an easy way to install Scilab in Fedora. But I had that problem on two machines… And big troubles trying to install the ATOMS IPCV.

Now, I have just downloaded the official scilab-2026.0.1.bin.x86_64-linux-gnu.tar.xz and everything works perfectly.

I can now begin my journey learning and using Scilab. Thanks again Vincent.