No Plotting Done In Function With Changing Variables
显示 更早的评论
I am trying to plot a function that varies as a function of angular values. I have followed example code from many here and can get the code to run, but the resultant plot is empty. Can anyone spot what kind of issue I'm having? Gamma seems to reach the value of 6 before quitting on me
ncont=3.24;
kcont=4.28;
step=pi/180
limit=2*pi
for gamma = 0:step:limit
num1=(((ncont*cos(gamma))-1)^2)+((kcont^2)*cos(gamma)^2);
num2=((ncont-cos(gamma))^2)+kcont^2;
den1=(((ncont*cos(gamma))-1)^2)+((kcont^2)*cos(gamma)^2);
den2=((ncont+cos(gamma))^2)+kcont^2;
abs=1-(0.5*((num1/den1)+(num2/den2)));
plot(gamma,abs);
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Gamma Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

