[Scilab-users] How replace symbols and letters in a matrix

Serge Steer Serge.Steer at inria.fr
Thu Jan 10 09:30:18 CET 2013


You can substitute the "*" using Scilab
t=mgetl('your file');
t=strsubst(strsubst(t," *" ," 0 ")," S "," 0 ")
Le 09/01/2013 22:35, constantina a écrit :
mputl(t,'your file')

Serge Steer
> Hello everyone (first of all, sorry 4 my poor english), im newbie in scilab.
> Im trying to process data, it includes a header and a matrix with numbers,
> letters and symbols.  I used Data=fscanfMat(flist(file)) to read the matrix
> without the header; but i can read only the first line (and till the 8
> column) then I obtain zeros... i have problems with the symbol * and the
> letter S. I cant use linux for replace the caracters...  The form of the
> data is:
>
> /Gem Systems GSM-19W 2065231 v7.0 12 IX 2011 M ew3fl.v7o
> /ID 1 file 02survey.wm 04 VII12
> /
> /X Y elevation nT sq cor-nT sat time picket-x picket-y
> line 000000
> 0369875.71 7435000.99 000780 23623.80 99 000000.00 08 S 141058.0 0 0
> 0369875.71 7435000.99 000780 23623.91 99 000000.00 08 S 141058.5 * *
> 0369875.71 7435000.99 000780 23623.60 99 000000.00 08 S 141059.0 * *
> 0369875.71 7435000.99 000780 23623.01 99 000000.00 08 S 141059.5 * *
> 0369875.71 7435000.99 000780 23623.99 99 000000.00 08 S 141100.0 * *
>
> I have to replace the S and * for a zero
> How can I do it???
>
>
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/How-replace-symbols-and-letters-in-a-matrix-tp4025637.html
> Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>




More information about the users mailing list