Matlab too many input arguments using csvread I have files called t1_25, t1_45, t1_65, t2_25, t2_45 and so on till t5_65.

I wrote this piece of code:

MaxForce =[0,0,0;0,0,0;0,0,0;0,0,0;0,0,0;0,0,0];

MaxForce(1,1) = 25;

MaxForce(1,2) = 45;

MaxForce(1,3) = 65;

HeightNo = 3;

NoOfRepeats = 5;

for x = 1:HeightNo
    for y =1:NoOfRepeats

        if x == 1

        MaxForce(y+1,x)= ((max(csvread('t', y, '_25.csv',1,1)))-0.392)/0.000267;
        if x ==2
            MaxForce(y+1,x)= ((max(csvread('t', y, '_45.csv',1,1)))-0.392)/0.000267;
            if x ==3
                MaxForce(y+1,x)= ((max(csvread('t', y, '_65.csv',1,1)))-0.392)/0.000267;
            end
        end
        end
    end
end

MaxForce(:,:)


It says Error in Project (line 10)
        MaxForce(y+1,x)= (max(csvread('t', y, '_25.csv',1,1))-0.392)/0.000267;

Why?
You should improve your question and it seems not being related with arduino at all. However, what I think you are trying to do is to auto generate the name of the file you use in cvsread accordingly to the value of y. This can be done using sprintf, in your case for the first expression csvread(sprintf('t%d_25.csv',y),1,1).
Although, the structure of your code seems really messy take a look at your end instructions.