Error using * Inner matrix dimensions must agree.

Can someone hepl me with this? I get an error at line 12.
function L=dispersion(T,d)
T=[0.5 0.5 2 2 8 10 14];
d=[0.1 0.5 0.1 0.5 10 50 0.5];
L=9.81*T.^2/(2*pi);
tol=10^-8;
err=tol+1;
while err>=tol
fL=L-((9.81*T.^2/(2*pi))*tanh(2*pi*d/L));
fderL=1-(9.81*T.^2*d.*(tanh((2*pi*d)/L)^.2-1))/(L.^2);
Lnew=L-fL/fderL;
err=abs(L-Lnew);
L=Lnew;
end

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 10월 17일

0 개 추천

fderL=1-(9.81*T.^(2*d.*(tanh((2*pi*d)/L).^2-1))/(L.^2));

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

dj
2018년 10월 17일

편집:

2018년 12월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by