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
2018년 3월 13일
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
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개)
카테고리
도움말 센터 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!