Hi to all,
I want to ask how can I load files with for loop?
My file names are like D1,D2,D3 and so on..

THen how do i assign the filename variable so that Matlab recognises it?

I tried using this code but it seemed that Matlab recognised the a as the teh word "D1" rather than the file D1 and it says ndex exceeds matrix dimensions

for n=1:20
% read data file
load ();
a =

lati = a(5,: );

Thanks

Create the filename as a string value and use the string instead to open the file.