Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

reading data files???

12 views
Skip to first unread message

jude

unread,
Apr 29, 2012, 4:53:06 PM4/29/12
to
Suppose I have some data files named t1.dat, t2.dat, t3.dat, etc.
I can read these into Maple using: A[1]:=Read("mydirectory/t1.dat"),
and so on.

Can this be done in a loop? Something like: for i to 10 do
A[i]:=Read(???...what could i put here) od;

Joe Riel

unread,
Apr 29, 2012, 6:01:09 PM4/29/12
to
A[i] := Read(sprintf("mydirectory/t%d.dat", i));
end do;

--
Joe Riel

jude

unread,
Apr 29, 2012, 7:59:36 PM4/29/12
to
On Apr 29, 6:01 pm, Joe Riel <j...@san.rr.com> wrote:
thanks
0 new messages