[Scilab-users] using csvRead

Samuel Gougeon sgougeon at free.fr
Sat Oct 15 20:11:46 CEST 2016


Le 15/10/2016 19:32, Rafael Guerra a écrit :
>
> Thanks Samuel, but I could not see where does it say how can we 
> convert a mlist of ctype to a regular matrix, so that we can use all 
> usual matrix operations. Could you please advise.
>

You are right, the *cblock* type is nowhere documented. Simple tests 
show that it is similar to -- but more handy than -- a row of cells:

-->b = msscanf(-1,['012345 abc zoo';"457.1 tfr 845"],'%f %s %s')
  b  =
   12345      abc  zoo
   457.10001  tfr  845

-->b(:,1), typeof(b(:,1))
  ans  =
     12345.
     457.10001
  ans  =
  constant

-->b(:,2), typeof(b(:,2))
  ans  =
!abc  !
!     !
!tfr  !
  ans  =
  string

-->b(1,:)
  ans =
   12345  abc  zoo      // Yeh!

Searching for "cblock" in the help shows that, apart for Xcos, this 
mtype is used only by m*scanf().
Its addressing indices are exactly what we could expect for addressing 
cells contents, with no specific useless and awkward {} insertors or 
extractors.
[ BTW, {} yield an error at Scilab 5 compilation time. So the same macro 
code can't be compiled with Scilab 5 and Scilab 6 as soon as {} 
indexation is used].

Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161015/a7554c97/attachment.htm>


More information about the users mailing list