|
From: | Ramesh Yapalparvi |
Subject: | Re: reading files |
Date: | Wed, 29 Jul 2009 14:00:12 -0700 (PDT) |
If you want to read all the files with .txt files you can try these commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% snapshot= ['t10';'t11';'t12';'t13';'t14';'t15';'t16';'t17';'t18';'t19';'t20';'t21';'t22';'t23';'t24';'t25';'t26';'t27';'t28';'t29';'t30']; [nn,mm]=size(snapshot); nx=21; Cx=3; Nx=21; n1x=21; for i=1:nx name = strcat(snapshot(i:nn:nn*mm),'.dat'); fid=fopen(name,'r'); A1x = fscanf(fid,'%f',[3,inf]); A1x = A1x'; [p,q]=size(A1x); [p,q]=size(A1x); X(1:p,i) = A1x(:,Cx); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%% what I am trying is to read all the data files together. These data files have 3 columns i. e [3,inf]...... If I want to read only the 1st column I give Cx=1 This will work since I got it working as well --- On Wed, 7/29/09, James Sherman Jr. <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |