no data appearing in my plot
Mostra commenti meno recenti
I am trying to plot the phase velocity (mupe/mupm) as it changes as a function of the frequency (f). I'm not sure what is missing in my code to fix it. I tried adding axes to see if the data was where I thought it'd be but there wasn't any data there either.
epsilono = (10^-9)/(36*pi);
muo = 4*pi*(10^-7);
a = 0.9;
b= 0.4;
fe = (1/2*epsilono*muo)*sqrt((1/a)^2+(0/b)^2);
fm = (1/2*epsilono*muo)*sqrt((1/a)^2+(1/b)^2);
f = (8.24*10^9):(0.1*10^9):(12.4*10^9);
fef = rdivide(fe, f).*rdivide(f, fe);
fem = rdivide(fm, f).*rdivide(f, fm);
mupe = 1./(sqrt(1-fef));
mupm = 1./(sqrt(1-fem));
betae = 2.*f.*pi.*sqrt(muo*epsilono).*sqrt(1-fef);
betam = 2.*f.*pi.*sqrt(muo*epsilono).*sqrt(1-fem);
lambdae = 2*pi./betae;
lambdam = 2*pi./betam;
figure;
plot(abs(mupe), f);
ylabel('Phase Velocity')
xlabel('Frequency')
title('Frequency vs. Phase Velocity')
3 Commenti
Samuel Anderson
il 13 Mar 2018
Abraham Boayue
il 13 Mar 2018
Hey Samuel, Can you post the formular of the phase velocity that you are trying to plot? And the parameters too. I'm afraid to say that your code appears bit odd and uncleared. rdivide is hardly used for making division in matlab.
Murali Krishna
il 24 Mar 2018
Hello Samuel
fef = rdivide(fe, f).*rdivide(f, fe);
fem = rdivide(fm, f).*rdivide(f, fm);
By this statements the value of fef and fem will always be 1.Hence values of mupe and mupm will be infinite.
I think because of this you are not able to see the plot.
Risposte (0)
Categorie
Scopri di più su Surface and Mesh Plots in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!