Goodness of fit test

1 回表示 (過去 30 日間)
Nadia jabeen
Nadia jabeen 2021 年 7 月 2 日
回答済み: Nadia jabeen 2021 年 7 月 2 日
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 件のコメント
Image Analyst
Image Analyst 2021 年 7 月 2 日
You forgot to attach 'Book1.txt'.
And replace
syms x
with
x = 600 : 0.5 : 800;

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

回答 (1 件)

Nadia jabeen
Nadia jabeen 2021 年 7 月 2 日
I have attached txt file

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by