# MATLAB: How to input many files with alphanumerical name by using a script

inputscriptvariables

Hi,
I have many input files with title 'dataX', where X is an integer. I would like to create a script that reads every file. My script is like this:
for j=1:50;temp = ['data', num2str(j)];var= tempforceobs=  var(:,2);forcefin= var(:,3);...end
Like that 'var' is being defined as 1×1 matrix of 5 characters 'data1', but what I need is 'var = data1' so I can use it later to read every column of any dataj file.
Thank you Lef