Undefined operator '/' for input arguments of type 'function_handle'
Show older comments
Hi everyone.
Cant find the problem in the function :(((
b=400; %mm
d=500; %mm
Asv = [3000 5000 3000 5000]; %mm^2
fckv = [30 30 90 90]; %Mpa
num_fckv = numel(fckv);
fsolve_opts = optimoptions('fsolve','Display','off');
c0 = 100;
tic
for k = 1:num_fckv
fck = fckv(k);
Ecshah=57000/145*(fck*145)^0.5; %Mpa
Es=200000; %Mpa
Esh=8500; %Mpa
fy=500; %Mpa
fsu=750; %Mpa
epssh=0.009;
epssu=0.075;
eps0=1.027*10^-7*fck*145+0.00195;
kshah=0.025*fck*10^3;
A=Ecshah*eps0/fck;
P=Esh*((epssu-epssh)/(fsu-fy));
epsy=fy/Es;
As = Asv(k);
%Values at yield
epssAtMy= epsy;
epscmAtMy=@(cAtMy) epssAtMy*cAtMy./(d-cAtMy);
funCshahAtMy=@(epsc) (1-(1-epsc./eps0).^A) .* (epsc<=eps0) + exp(-kshah*(epsc-eps0).^1.15) .* (epsc>eps0);
compressionAtMy=@(cAtMy) b*fck*cAtMy/epscmAtMy(cAtMy)*integral(funCshahAtMy,0,epscmAtMy(cAtMy))/1000;
%compressionAtMy=@(cAtMy) b*fck*cAtMy/epscmAtMy*integral(funCshahAtMy,0,epscmAtMy)/1000;
sigmaSteelAtMy= fy;
tensionAtMy= sigmaSteelAtMy*As/1000;
cAtMy(k)=fsolve(@(cAtMy) compressionAtMy(cAtMy)-tensionAtMy, c0, fsolve_opts)
c0=cAtMy(k);
funM=@(epsc) (1-(1-epsc./eps0).^A).*(d-cAtMy(k)+(cAtMy(k)./epscmAtMy).*epsc) .* (epsc<=eps0) + exp(-kshah*(epsc-eps0).^1.15).*(d-cAtMy(k)+(cAtMy(k)./epscmAtMy).*epsc) .* (epsc>eps0);
M(k)=b*fck*cAtMy(k)/epscmAtMy*integral(funM,0,epscmAtMy)/1000000
end
toc
Error:
Undefined operator '/' for input arguments of type 'function_handle'.
Error in Untitled (line 39)
M(k)=b*fck*cAtMy(k)/epscmAtMy*integral(funM,0,epscmAtMy)/1000000
Accepted Answer
More Answers (0)
Categories
Find more on Parallel Computing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!