I have an excel file in my matlab folder containing 9 columns with data. Each column is another variable in my formula.
I would like to do the following: - associate a specific column in excel with a specific variable in matlab: - `% define variables m1=xlsread('jongens0','B:B'); m2=xlsread('jongens0','C:C'); m3=xlsread('jongens0','D:D'); m4=xlsread('jongens0','E:E'); m5=xlsread('jongens0','F:F'); m6=xlsread('jongens0','G:G'); m7=xlsread('jongens0','H:H'); m8=xlsread('jongens0','I:I');
Next I calculate my growth function
tmin=0;
tmax=20;
dt=1/100;
t = tmin:dt:tmax;
y = m1.*(1-1./(1+(m2.*(t+m8)).^m5+(m3.*(t+m8)).^m6+(m4.*(t+m8)).^m7));
next I calculate the velocity function (the first derivate)
%velocityfunction
dy=diff(y)./dt;
next I use the following commands to obtain the minimum and maximum velocity as also the time and growth at this time:
max(dy);
min(dy) if t<12;
imax = find(dy==max(dy)) + 1;
imin = find(dy==min(dy)) + 1;
t(imax);
t(imin);
y(imax);
y(imin);
If i enter this in the matlab command window i get the following error: Error using + Matrix dimensions must agree.
Can somebody point me out what I am doing wrong?
Thanks
tis a different length from the variablesm1...8. I'm assuming, here, that it's giving you this error on the liney = ...(you haven't actually stated which line causes the error in the question) - wakjah