Solution of implicit function - how to plot implicit functions?

2 views (last 30 days)
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]);

Accepted Answer

AndresVar
AndresVar on 10 Feb 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.
  1 Comment
Carlos Andrés Galán Pinilla
Thank you very much for your help and for your idea, is an easier way to solve it, however it is far from expected. What could it be?
I show what is expected:
Thank you

Sign in to comment.

More Answers (0)

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!