Solution of implicit function - how to plot implicit functions?
조회 수: 2 (최근 30일)
이전 댓글 표시
Carlos Andrés Galán Pinilla
2022년 2월 10일
댓글: Carlos Andrés Galán Pinilla
2022년 2월 10일
Hi,
I'm trying to solve the following equation for (f,Cp):
I have an equation: Symmetric:
k= 2*pi/λ = ω/Cp,
ω=2*pi* f
Cp=f*λ
Cp:Phase velocity
cL = 5.850;% Longitudinal velocity in [mm/µseg]
cT = 3.184;% Shear velocity in [mm/µseg]
h = 1; %thickness [mm]
Thank you for the help.
This is my code, but it has errors. ¿what is my mistake?
cL = 5.850;% Longitudinal velocity in [mm/µseg]
cT = 3.184;% Shear velocity in [mm/µseg]
d = 1;%thickness [mm]
A=2*pi;
p = @(Cp,f)sqrt(A*f.^2/cL^2-A*f.^2/Cp^2);%p es una Función [Function Handle @], entrada Cp,f
q = @(Cp,f)sqrt(A*f.^2/cT^2-A*f.^2/Cp^2);%q es una Función [Function Handle @], entrada Cp,f
symmetric = @(f,Cp)tan(q(Cp,f)*d)./q(Cp,f)+4*A*f.^2/Cp^2*p(Cp,f).*tan(p(Cp,f)*d)./(q(Cp,f).^2-A*f.^2/Cp^2).^2;
figure
h1=fimplicit(symmetric,[0 3.5 0 22]);
댓글 수: 0
채택된 답변
AndresVar
2022년 2월 10일
Based on the equation you posted, the variable A=2*pi needs to be squared when it's inside the square root. But your code doesn't square A just f.
It's a messy formula so you should double check a couple of points by hand and then check for example the values
symmetric([0 3.5],[0 22])
Also you can put it in a separate function to avoid using 2 functions
fimplicit(@symmetric,[0 3.5 0 22])
function out = symmetric(cp,f)
CL = 5.850;% Longitudinal velocity in [mm/µseg]
CT = 3.184;% Shear velocity in [mm/µseg]
h=1;
om = 2*pi.*f;
k = om./cp;
p = sqrt(om.^2/CL^2-k.^2);
q = sqrt(om.^2/CT^2-k.^2);
out = tan(q*h)./q + 4*k.^2.*p.*tan(p*h)./(q.^2-k.^2).^2;
end
I noticed the plot changed a little when I use this method however.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!