hi everyone. this is my code. i need some help. there is an error of matirx dimension. i don't understand why is this error..actually i could not find any error when i look at the specific line.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
m0=0.139; t1=0.265; t2=0.265; k=0.95; x2=[0.107108081791626;0.121713729308666;0.141187925998053;0.180136319376826;0.199610516066212;0.223953261927945;0.272638753651412;0.326192794547225;0.374878286270691;0.423563777994158;0.472249269717624;0.520934761441091;0.569620253164557;0.628042843232717;0.671859785783836;0.725413826679649;0.774099318403116;0.822784810126582;0.876338851022395;0.925024342745862;0.973709834469328;1.04673807205453;1.14897760467381;1.24634858812074;1.34858812074002;1.44595910418695;1.54819863680623;1.64556962025316;1.74780915287244;1.85004868549172;1.94741966893866;2.04965920155794;2.15189873417722;2.24440116845180;2.35150925024343;2.44888023369036;2.55111976630964;2.64849074975657;2.75073028237585;2.84810126582278;2.95034079844206] y2=[304132.454332542;274100.000330995;255761.923013762;207758.005340356;187248.654728073;157457.187031665;123551.434794344;100372.254954385;78758.7810181322;61799.4045294796;48491.9440197912;38050.0209139858;32001.6249604141;25998.7572449680;21119.7677081825;17763.1890702461;14939.5690481211;12564.7890399044;10207.5399695729;8584.95890483577;7475.17329729610;5666.48842328580;4149.81610573156;3038.98830028796;2149.70051640266;1574.26607638051;1152.90356751183;874.095878848067;618.312469964784;468.801254039190;355.430632449889;269.485631150122;197.356057027209;149.624213162756;113.448121418273;86.0128619506164;67.5165233928179;52.9958758667747;40.1811936069545;31.5395023553527;25.6311104863127]
y2pos=[461146.649218508;415651.484737129;361809.822084431;326103.876582922;293931.574066363;230614.991344230;180949.826259286;141990.126127200;111414.944851755;90512.6619452339;71024.6843083265;57696.0206214927;46870.2293135917;38077.0212362574;32024.3333365567;26016.3271737920;21880.7959907612;18402.6450002370;15477.3776579124;13017.1080930248;10948.6603253893;8299.25393259720;6077.90487906389;4450.96393361319;3259.63461635871;2305.70204143808;1688.56596040297;1280.26180647770;937.559774231338;686.592637388054;520.570916902141;394.680791988835;299.244895125736;219.142658864324;172.017883349496;135.026892278244;102.373219582273;80.3587244741728;60.9255031138076;49.5121414456678;38.8636613690320] y2neg=[304132.454332542;274100.000330995;255761.923013762;207758.005340356;187248.654728073;157457.187031665;123551.434794344;100372.254954385;78758.7810181322;61799.4045294796;48491.9440197912;38050.0209139858;32001.6249604141;25998.7572449680;21119.7677081825;17763.1890702461;14939.5690481211;12564.7890399044;10207.5399695729;8584.95890483577;7475.17329729610;5666.48842328580;4149.81610573156;3038.98830028796;2149.70051640266;1574.26607638051;1152.90356751183;874.095878848067;618.312469964784;468.801254039190;355.430632449889;269.485631150122;197.356057027209;149.624213162756;113.448121418273;86.0128619506164;67.5165233928179;52.9958758667747;40.1811936069545;31.5395023553527;25.6311104863127] pt111=0.01:0.01:3;
pt22=3.01:0.01:6;
pt1=pt111./sum(pt111); pt2=pt22./sum(pt22) pt=k*pt1+(1-k)*pt2
i=0; for pt=0.01:0.01:6 i=i+1;
A1=sqrt(pt111.^2+m0^2); A2=sqrt(pt22.^2+m0^2); j=0; for n=1:10 j=j+1; b1=n*A1/t1; b2=n*A2/t2; Q(j)=2*3.14*k*pt1*A1*((+1).^n+1)*besselk(1,b1)*0.01+(1-k)*(2*3.14*pt2*A2*(+1).^n+1)*besselk(1,b2)*0.01; end y10(i)=sum(Q); end
pt=0.01:0.01:6 y11=y10./sum(y10); y12=2794928*y11./pt; semilogy(pt,y12,'k') hold on
xlabel('P_{T}') ylabel('1/N_{ev} 1/2\piP_{T} d^{2}N(dP_{T}dy) (GeV/c)^{-2}') semilogy(x2,y2,'rs') hold on x2i=x2 y2i=interp1(pt,y12,x2i); kafa=y2./y2i
c=y2pos-y2neg d=c./y2i d1=c./y2 chi=((y2-y2i)./c).^2 S=sum(chi) %%%%%%%%%%%% the value of chi^2 dof=37-3 AA=S/dof
0 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur Aerospace Applications dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!