[Scilab-users] Can't Find the Error

classic Classic list List threaded Threaded
3 messages Options
rentboi rentboi
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Can't Find the Error

Hey everyone


I kept on trying to find out what the error is in the code below, but can't
seem to find it. Even weirder is that among my colleagues I am the only one
who gets a different output than the solution with the same code.



temp=csvRead("the path to the file/meas0001.csv", ascii(9),
'.','string',[',' ' ']);   // to read the csv data
temp(1,:)=[];  // to remove the first line
temp($,:)=[];  // to remove the last line

The output I get :


!     24-NOV-2017 13:22:27 9499019   !
!                                    !
! 2.3171840E+02 Vac                  !
!                                    !
! 2.3181050E+02 Vac                  !
!                                    !
! 2.3202420E+02 Vac                  !
!                                    !
! 2.3206130E+02 Vac                  !
!                                    !
! 2.3207920E+02 Vac                  !
!                                    !
! 2.3202870E+02 Vac                  !
!                                    !
! 2.3194700E+02 Vac                  !
!                                    !
! 2.3195150E+02 Vac                  !
!                                    !
! 2.3192480E+02 Vac                  !
!     24-NOV-2017 13:55:22         !

The "supposed to be like this" output is with only the same numbers, but
without the "Vac", the dates and the times in the first and last row and the
exclamation marks.

I'd be flattered, if someone could help me out.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Rafael Guerra Rafael Guerra
Reply | Threaded
Open this post in threaded view
|

Re: Can't Find the Error

Hi can you share a zip of input file?
Rgds,Rafael

-----Original Message-----
From: users [mailto:[hidden email]] On Behalf Of rentboi
Sent: Thursday, November 30, 2017 8:36 PM
To: [hidden email]
Subject: [Scilab-users] Can't Find the Error

Hey everyone


I kept on trying to find out what the error is in the code below, but can't
seem to find it. Even weirder is that among my colleagues I am the only one
who gets a different output than the solution with the same code.



temp=csvRead("the path to the file/meas0001.csv", ascii(9),
'.','string',[',' ' ']);   // to read the csv data
temp(1,:)=[];  // to remove the first line
temp($,:)=[];  // to remove the last line

The output I get :


!     24-NOV-2017 13:22:27 9499019   !
!                                    !
! 2.3171840E+02 Vac                  !
!                                    !
! 2.3181050E+02 Vac                  !
!                                    !
! 2.3202420E+02 Vac                  !
!                                    !
! 2.3206130E+02 Vac                  !
!                                    !
! 2.3207920E+02 Vac                  !
!                                    !
! 2.3202870E+02 Vac                  !
!                                    !
! 2.3194700E+02 Vac                  !
!                                    !
! 2.3195150E+02 Vac                  !
!                                    !
! 2.3192480E+02 Vac                  !
!     24-NOV-2017 13:55:22         !

The "supposed to be like this" output is with only the same numbers, but
without the "Vac", the dates and the times in the first and last row and the
exclamation marks.

I'd be flattered, if someone could help me out.



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
JLan JLan
Reply | Threaded
Open this post in threaded view
|

Re: Can't Find the Error

This post was updated on .
In reply to this post by rentboi
On 30.11.2017 20:35, rentboi wrote:
> Hey everyone
>
>
> I kept on trying to find out what the error is in the code below,

Apparently your data are not separated by ascii(9) - tab.

Anyway, If you just want the numbers:
temp2=strtod(csvRead("filename", ascii(13),'.','string',[',' ' '])(2:($-1)));

Jan

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users