MATLAB Answers

mm99
0

Plotting solution of equation

Asked by mm99
on 29 Oct 2019
Latest activity Answered by darova
on 29 Oct 2019
Hi!
How can I get the plot similar or the same as the one in the picture from such a solution of my equation:
d =1e-3; % plate thickness [m]
h=d/2;
f_zero=0;
f_step = 100000; % frequency step [Hz]
f_max = 15e6; % max frequency [Hz]
ct = 2.26 * 1e-3 / 1e-6; % transverse wave speed for aluminium[m/s]
f = f_zero : f_step : f_max;
for omega=2*pi.*f;
for k=0:1:5e4;
eq=@(k) sin(sqrt((omega.^2/ct.^2)-k.^2).*h);
if (sign(eq(k-1)) ~= sign(eq(k+1)));
sol=fzero(eq,k-1);
end
end
end
Thanks in adcance.

  0 Comments

Sign in to comment.

1 Answer

darova
Answer by darova
on 29 Oct 2019

Experiment!
d = 1e-3; % plate thickness [m]
h = d/2;
ct = 2.26 * 1e-3 / 1e-6; % transverse wave speed for aluminium[m/s]
omega = linspace(10e6,15e6,10);
k = (0:100)*40;
cla
hold on
for i = 1:length(omega)
w = sin(sqrt((omega(i).^2/ct.^2)-k.^2).*h);
plot(k,w,'color',rand(1,3))
text(k(1),w(1),num2str(i))
end
hold off

  0 Comments

Sign in to comment.