|
Hi all,
I am seeing the error below using quad. I am actually passing in 'iii' but I am not sure why it keeps giving me the same error. I have included my function too.
quad(@myfun2, 0,0.3,[],1)
Input argument 'iii' is undefined
function phi = myfun2(x,iii)
n = 6;
L=0.3;
cal=5;
ii=1;
while ii< n+1
mu(ii)=cal*pi/4;
cal=cal+4;
ii=ii+1;
end
for i = 1:n
N(i) = sqrt(L)*(sqrt(abs(cos(mu(i))*cosh(mu(i))-1)*abs(2*sin(mu(i))*sinh(mu(i)))))/abs(cos(mu(i))-cosh(mu(i)));
end
phi = (1./N(iii))*((sin(mu(iii))-sinh(mu(iii)))./(cos(mu(iii))-cosh(mu(iii)))*(cos(mu(iii)*x/L)-cosh(mu(iii)*x/L))-(sin(mu(iii)*x/L)-sinh(mu(iii)*x/L)));
|