我有一個方程f(β) = cosh β cos β + 1 = 0
,我需要使用βi根來找到一些頻率。對於頻率的公式是在matlab中使用牛頓方程
fi = sqrt((βi^4 * E*I)/(4*pi*m*L^3));
我得到這個錯誤,我不知道問題出在哪裏
??? Subscript indices must either be real positive integers or logicals.
Error in ==> C:\Documents and Settings\Laura Lupas\Desktop\subiect88\frecventa.m
On line 18 ==> p= p0 - f(p0)/fd(p0);
這裏是我的代碼:
function p = frecventa(f,fd,p_start,eps);
p0=p_start;
i=1;
L = 0.9; %lungimea grinzii in m
b = 0.025; %latimea grinzii in metri
h = 0.0025; %inaltimea in metrii
dens = 7850; % kg/m cub
v = b * h * L ; % volum
m = dens * v;
E = 2000e11; %modulul de elasti N/m patrat
I= (b*h^2)/12;%mometul de inertie
while(i <= 2)
p= p0 - f(p0)/fd(p0);
if abs(p-p0) < eps
return
end
i = i + 1;
p0=p;
p = sqrt((p0^4 * E*I)/(4*pi*m*L^3))
end
% beta = 0:0.001:pi
%f = cosh(beta).*cos(beta) + 1;
%fd = sinh(beta).*cos(beta) - cosh(beta).*sin(beta);
您是否設法解決該問題? – mathematician1975