[scilab-Users] uploading a file txt

Mathieu Dubois mathieu.dubois at limsi.fr
Tue Jun 21 17:03:46 CEST 2011


Hello,
On 06/21/2011 03:41 PM, Chiara Venier wrote:
> Dear All,
>
> I am a new Scilab user.
> I am not able to load a file txt in a file.sce.
> The error visualized is:
>
> Warning: file 'grd.txt' already opened in Scilab.
This warning comes from the fact that you have used mopen on this file.
Try mclose(fd) (where fd is the variable you get from mopen) or 
mclose('all').
However this is not related to your problem.
> load('grd.txt');
>                 !--error 246
> Function not defined for given argument type(s),
>
>   check arguments or define function %_load for overloading.
load is a function to load a scilab variable written with save not to 
load text files (see help('load')).
> How shall I solve the problem?
How is you text file formatted?

If it is CSV (comma-separated values), try read read_csv.

Otherwise you have to open the file (with mopen) and load data with mscanf.
If you have some experience in C it should not be a big deal.

HTH,
Mathieu
>
> Thanks
>
> Chiara Venier
>




More information about the users mailing list