When the data file is too large, one cannot read all of them into stack. Instead one has to read line by line and only put those usefull data into stack. To read a data file line by line, one can do it in the following way.
fid = mopen('D:\WORK\pe1.TXT', "r");
while (done_yet == 0);
[num_read, val(1), val(2)] = mfscanf(fid, "%f %f");
... ...
if (num_read <= 0);
done_yet = 1;
end
end;
Firstly, open the file.
Then read data in format from one line.
Deal with the data.
If the file is not end, continue reading.
2010年4月16日星期五
Scilab: Increase stacksize
stacksize()
This command will return two numbers. The first one is the current stacksize, and the second one is how much in use. One can give these values to a variable by
v = stacksize()
To increase the stacksize, use
stacksize(n)
where n is a number that is the stacksize that one wants to set.
This command will return two numbers. The first one is the current stacksize, and the second one is how much in use. One can give these values to a variable by
v = stacksize()
To increase the stacksize, use
stacksize(n)
where n is a number that is the stacksize that one wants to set.
2010年3月17日星期三
Scilab: 画二维曲线时如何加入误差
只要在原本的plot命令后面,再加入下面的这条命令:
errbar(x,y,em,ep)
parameters:
x:横坐标 horizontal coordinates
y:纵坐标 vertical coordinates
y-em:误差下限 lower error limits
y+ep:误差上限 upper error limits
errbar(x,y,em,ep)
parameters:
x:横坐标 horizontal coordinates
y:纵坐标 vertical coordinates
y-em:误差下限 lower error limits
y+ep:误差上限 upper error limits
订阅:
博文 (Atom)