no data appearing in my plot

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 件のコメント

Samuel Anderson
Samuel Anderson 2018 年 3 月 13 日
I added more data points and switched it to plot just the points and it fixed it.
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.01*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, '*', abs(mupm), f, 'r*');
ylabel('Phase Velocity')
xlabel('Frequency')
title('Frequency vs. Phase Velocity')
figure;
plot(abs(lambdae), f, '*', abs(lambdam), f, 'r*');
ylabel('Wavelength')
xlabel('Frequency')
title('Frequency vs. Wavelength')
Abraham Boayue
Abraham Boayue 2018 年 3 月 13 日
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
Murali Krishna 2018 年 3 月 24 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

製品

質問済み:

2018 年 3 月 12 日

コメント済み:

2018 年 3 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by