root finding and plot of graph
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
function y=f(x,t3)
k0=(2*pi/0.6328)*1e6;
t2=1.5e-6;
n1=1.512;n2=1.521;n3=4.1-1i*0.211;
n4=1;
m=0;
k1=k0*sqrt(n1^2-x^2);
k2=k0*sqrt(n2^2-x^2);
k3=k0*sqrt(n3^2-x^2);
k4=k0*sqrt(n4^2-x^2);
y=-(k2)*t2+atan(k1/1i*k2)+atan((k3/k2)*tan(atan(k4/1i*k2)-k3*t3))+m*pi;
end
pl plot the graph between t3 vs x(real) ,t3 vs x(imag)
t3=1e-9:1e-6;
pl pl help to plot
0 comentarios
Respuestas (2)
Alan Stevens
el 12 de En. de 2022
Are you looking for something like this?
hi = 1e-6; lo = 1e-9;
n = 500;
dt = (hi-lo)/n;
t3 = lo:dt:hi;
y = f(t3);
subplot(2,1,1)
plot(t3,real(y)),grid
xlabel('t3'),ylabel('real part of y')
subplot(2,1,2)
plot(t3,imag(y)),grid
xlabel('t3'),ylabel('imaginary part of y')
function y=f(t3)
k0=(2*pi/0.6328)*1e6;
t2=1.5e-6;
n1=1.512;n2=1.521;n3=4.1-1i*0.211;
n4=1;
m=0;
k1=k0*sqrt(n1^2-t3.^2);
k2=k0*sqrt(n2^2-t3.^2);
k3=k0*sqrt(n3^2-t3.^2);
k4=k0*sqrt(n4^2-t3.^2);
y=-(k2).*t2+atan(k1./1i.*k2)+atan((k3./k2).*tan(atan(k4./1i.*k2)-k3.*t3))+m*pi;
end
Ver también
Categorías
Más información sobre 2-D and 3-D Plots 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!