Goodness of fit test
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I want to plot graph of variables "N" and "intf" with same xaxis. Intf should take values of x from range(600 to 800) with interval of .5. These values should be stored in a cell array or matrix. Then plot for these values will be drawn. After this goodnessof fit will be calulated between N and intf values. I have attached code. kindly help me.
syms x
load Book1.txt;
wave=Book1(:,1);
corr=Book1(:,2);
Efficiency=Book1(:,3);
experiment=Book1(:,4);
counts=(experiment/corr);
Photoelectrons=((counts-50)*4)/1;
Photons=((Photoelectrons)*(Efficiency));
Energy =(Photons*(1240/wave));%(nm)
W=(Energy/100);
N=(W/(5.3*10^(-12)));
yyaxis left
plot(wave,N)
hold on
h=6.62e-34;%J*s
c=3e8;%m/s
k=1.38E-23;%J/K
T=610;
z=5.67e-8;
f=(((15*z)/(3.14^4))*((k*T)/(h*c))*(x^4));
intf=int(f);
yyaxis right
a=fplot(intf,[600 800]);
hold off
fit = goodnessOfFit(a,N,cost_func);
1 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!