plot of equation of function

2 visualizzazioni (ultimi 30 giorni)
shiv gaur
shiv gaur il 25 Gen 2022
Commentato: shiv gaur il 25 Gen 2022
k0=2*pi/632.8e-9;
n1=1.512;
n2=1.521;
n3=2.66;
n4=0.15+1i*3.5;
t2=2e-6;
m=0;
t3=1e-9:1e-6;
k1=@(x) k0*sqrt(n1^2-x^2);
k2=@(x) k0*sqrt(n2^2-x^2);
k3=@(x) k0*sqrt(n3^2-x^2);
k4=@(x) k0*sqrt(n4^2-x^2);
y=@(x,t3)-(k2)*t2+atan(k1/1i*k2)+atan((k3/k2)*tan(atan(k4/1i*k2)-k3*t3))+m*pi;
plot(t3,real(x))
plot(t3,imag(x)
  8 Commenti
shiv gaur
shiv gaur il 25 Gen 2022
this is the program pl plot t3=1e-9 to 1e-6 vs real x
program is running
[b]=fminsearch(@(b) abs(trial0(complex(b(1),b(2)))) ,[1,1]);
beta=complex(b(1),b(2))
function beta1 = trial0(beta)
n1=1.512;
n2=1.521;
n3=4.1-1i*0.211;
n4=1;
lambda = 633e-9;
k0 = (2*pi)/lambda;
t2 = 2e-6;
%t3=0;
m=0;
S1 = k0*sqrt(n1^2-beta^2);
S2 = k0*sqrt(n2^2-beta^2);
S3 = k0*sqrt(n3^2-beta^2);
S4 = k0*sqrt(n4^2-beta^2);
beta1=-(S2)*t2+atan(S1/1i*S2)+atan((S3/S2).*tan(atan(S4/1i*S2)-S3*t3))+m*pi;
end
how to plot pl help to write where we store the value of t3 plot
shiv gaur
shiv gaur il 25 Gen 2022
i try but empty value showing

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Tag

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by