no data appearing in my plot
Show older comments
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 Comments
Samuel Anderson
on 13 Mar 2018
Abraham Boayue
on 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
on 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.
Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!