Scilab
Posts  1 - 1  of  1
trivikramsb
I have a text file that has both string and numbers in it. It looks something like this:

density
12345
viscosity
678910
surface tension
11121314
........

and so on. the file is called "properties.txt" and it is a list of fluid properties that I need to use for my calculations.

What command could I use to extract the numbers from the text file and assign them to variables in scilab. I have tried:

mopen
file('open',...)
fscanfMat
read

nothing seems to get the job done. fscanfMat came close but it reads on the first number and not the rest of them.

I would appreciate it if someone could suggest a method of extracting the numbers as, say a column vector to be later assigned to different variables or directly assign them from the text file that has the data.

Thank you
Vikram
Save
Cancel
Reply
 
x
OK