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  =
 ans  =

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

 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].


users mailing list

Reply via email to