@01CE3519.BB7B0820]
TOGETHER EVERYBODY ACHIEVES MORE
From: Munian, Devaraj
Sent: Thursday, March 14, 2013 9:46 AM
To: 'users@lists.scilab.org'
Subject: Data Extraction Issue in Scilab
Dear Scilab Support,
We here in RNTBCI are testing Scilab to compare it against Matlab. We are doing
a pilot
Issue 1 :
data=read(engine.in,-1,1)
data =
0.08
0.08
0.001671
0.14835
0.
4000.
1.7
3.11
0.
1.
4.
5.
0.
Saket Choudhary
Undergraduate Student
IIT Bombay
India
On 14 March 2013 09:46, Munian, Devaraj devaraj.mun...@rntbci.com wrote:
Dear
Hello,
this small script solves your problem :
fd=mopen('engine.in','r');
s=mgetl(fd);
mclose(fd);
data1=[];
for i=1:size(s,1)
w=strsplit(s(i),'/\s+/');
for j=1:size(w,1)
data1(i,j)=w(j);
end
end
[r,c]=find(data=='bore');
Sorry for the small typing errors
("data" instead of "data1") :
fd=mopen('engine.in','r');
s=mgetl(fd);
mclose(fd);
data1=[];
for i=1:size(s,1)
w=strsplit(s(i),'/\s+/');
for j=1:size(w,1)
data1(i,j)=w(j);
end
end
[r,c]=find(data1=='bore');