Quantcast

Problem with function fscanfMat

classic Classic list List threaded Threaded
9 messages Options
BOUTARD david BOUTARD david
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with function fscanfMat

Hi,
 
I have a file *.txt (1014 lines and 1043 rows) to read.
 
My program is as follows:
 
FichTxt=uigetfile(["*.txt"],"","Fichier texte",%t);
temp1=fscanfMat(FichTxt(1));    
 
It works very well with Scilab 5.2. I update Scilab to version 5.3 and use the same program. But It cannot read my files. It is written :
 
Error 999 - I connot read the files C:\....*.txt
 
Is there a problem of compatibility between both versions (32 bit or 64 bit for exemple)? I am working with windows XP professionnal.
If yes where I could change the parameters?
 
I have tried to use mopen and mfscanf but it is very long compare to mfscanfmat.. Or my program may not be written as it should.
 
Regards
David

______________________________________________________________________
This email has been scanned by the SODERN Email Security System.

______________________________________________________________________
Allan CORNET Allan CORNET
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Problem with function fscanfMat

Hi,

 

Please create a bug report :

http://bugzilla.scilab.org/

 

and attach a file to reproduce this trouble

 

Thanks

 

Allan

 

De : BOUTARD david [mailto:[hidden email]]
Envoyé : mardi 26 juillet 2011 17:03
À : [hidden email]
Objet : [scilab-Users] Problem with function fscanfMat

 

Hi,

 

I have a file *.txt (1014 lines and 1043 rows) to read.

 

My program is as follows:

 

FichTxt=uigetfile(["*.txt"],"","Fichier texte",%t);
temp1=fscanfMat(FichTxt(1));    

 

It works very well with Scilab 5.2. I update Scilab to version 5.3 and use the same program. But It cannot read my files. It is written :

 

Error 999 - I connot read the files C:\....*.txt

 

Is there a problem of compatibility between both versions (32 bit or 64 bit for exemple)? I am working with windows XP professionnal.

If yes where I could change the parameters?

 

I have tried to use mopen and mfscanf but it is very long compare to mfscanfmat.. Or my program may not be written as it should.

 

Regards

David


______________________________________________________________________
This email has been scanned by the SODERN Email Security System.

______________________________________________________________________

Denis Crété Denis Crété
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Problem with function fscanfMat

In reply to this post by BOUTARD david

Hello,

did you check that your data file does not mix TABs and SPACEs ?

HTH

Denis

 

De : BOUTARD david [mailto:[hidden email]]
Envoyé : mardi 26 juillet 2011 17:03
À : [hidden email]
Objet : [scilab-Users] Problem with function fscanfMat

 

Hi,

 

I have a file *.txt (1014 lines and 1043 rows) to read.

 

My program is as follows:

 

FichTxt=uigetfile(["*.txt"],"","Fichier texte",%t);
temp1=fscanfMat(FichTxt(1));    

 

It works very well with Scilab 5.2. I update Scilab to version 5.3 and use the same program. But It cannot read my files. It is written :

 

Error 999 - I connot read the files C:\....*.txt

 

Is there a problem of compatibility between both versions (32 bit or 64 bit for exemple)? I am working with windows XP professionnal.

If yes where I could change the parameters?

 

I have tried to use mopen and mfscanf but it is very long compare to mfscanfmat.. Or my program may not be written as it should.

 

Regards

David


______________________________________________________________________
This email has been scanned by the SODERN Email Security System.

______________________________________________________________________

Antoine Monmayrant Antoine Monmayrant
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Problem with function fscanfMat

Le 26/07/2011 17:16, CRETE Denis a écrit :

> Hello,
> did you check that your data file does not mix TABs and SPACEs ?
> HTH
> Denis
>
> De : BOUTARD david [mailto:[hidden email]]
> Envoyé : mardi 26 juillet 2011 17:03
> À : [hidden email]
> Objet : [scilab-Users] Problem with function fscanfMat
>
> Hi,
>
> I have a file *.txt (1014 lines and 1043 rows) to read.
>
> My program is as follows:
>
> FichTxt=uigetfile(["*.txt"],"","Fichier texte",%t);
> temp1=fscanfMat(FichTxt(1));
>
> It works very well with Scilab 5.2. I update Scilab to version 5.3 and use the same program. But It cannot read my files. It is written :
>
> Error 999 - I connot read the files C:\....*.txt
>
> Is there a problem of compatibility between both versions (32 bit or 64 bit for exemple)? I am working with windows XP professionnal.
> If yes where I could change the parameters?
>
> I have tried to use mopen and mfscanf but it is very long compare to mfscanfmat.. Or my program may not be written as it should.
>
> Regards
> David
>
> ______________________________________________________________________
> This email has been scanned by the SODERN Email Security System.
>
> ______________________________________________________________________
>
Can you join the txt file that you have trouble opening?
I can try to open it here to see whether I can reproduce the bug...
fscanfMat is really picky about the file format as it is not supposed to
open anything other than files created by fprintfMat.
Did you try read_csv? I converted most of my programs to use read_csv
instead of fscanfMat.

Antoine

Antoine
boutardd boutardd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Problem with function fscanfMat

In reply to this post by Allan CORNET
I attached a file to bug report #9785
boutardd boutardd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Problem with function fscanfMat

In reply to this post by Denis Crété
As it worked with scilab 5.2, I did not check tab or space inside file. Moreover could you explain as I could modify tab or space as needed.
Antoine Monmayrant Antoine Monmayrant
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Problem with function fscanfMat

Le 27/07/2011 10:31, boutardd a écrit :
> As it worked with scilab 5.2, I did not check tab or space inside file.
> Moreover could you explain as I could modify tab or space as needed.
>
> --
> View this message in context: http://mailinglists.scilab.org/Problem-with-function-fscanfMat-tp3200598p3202835.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
Are you working under linux of windows?
Under Linux, you can use sed ( sed -i 's/\t/ /g' file.txt ) or tr.

--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

  Antoine Monmayrant LAAS - CNRS
  7 avenue du Colonel Roche
  31077 TOULOUSE
  Cedex 4 FRANCE

  Tel:+33 5 61 33 64 59

  email : [hidden email]
  permanent email : [hidden email]

+++++++++++++++++++++++++++++++++++++++++++++++++++++++


Allan CORNET Allan CORNET
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Problem with function fscanfMat

Hi,

Please update to Scilab 5.3.2 or more

It works for me on linux and windows

Allan

-----Message d'origine-----
De : Antoine Monmayrant [mailto:[hidden email]]
Envoyé : mercredi 27 juillet 2011 13:56
À : [hidden email]
Objet : Re: [scilab-Users] RE: Problem with function fscanfMat

Le 27/07/2011 10:31, boutardd a écrit :
> As it worked with scilab 5.2, I did not check tab or space inside file.
> Moreover could you explain as I could modify tab or space as needed.
>
> --
> View this message in context:
> http://mailinglists.scilab.org/Problem-with-function-fscanfMat-tp32005
> 98p3202835.html Sent from the Scilab users - Mailing Lists Archives
> mailing list archive at Nabble.com.
Are you working under linux of windows?
Under Linux, you can use sed ( sed -i 's/\t/ /g' file.txt ) or tr.

--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

  Antoine Monmayrant LAAS - CNRS
  7 avenue du Colonel Roche
  31077 TOULOUSE
  Cedex 4 FRANCE

  Tel:+33 5 61 33 64 59

  email : [hidden email]
  permanent email : [hidden email]

+++++++++++++++++++++++++++++++++++++++++++++++++++++++



boutardd boutardd
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Problem with function fscanfMat

Thanks for all.

David
Loading...