Solution of implicit function - how to plot implicit functions?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Carlos Andrés Galán Pinilla
el 10 de Feb. de 2022
Comentada: Carlos Andrés Galán Pinilla
el 10 de Feb. de 2022
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 comentarios
Respuesta aceptada
AndresVar
el 10 de Feb. de 2022
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!