필터 지우기
필터 지우기

hello everyone.i have a little probelm

조회 수: 1 (최근 30일)
waqas muhammad
waqas muhammad 2018년 1월 29일
댓글: Walter Roberson 2018년 1월 29일
m0=0.139;R=1.2*196.97^(1/3);
t0=0.113;beta=0.413;n0=2;
x2=[0.250000000000000;0.342592592592593;0.444444444444444;0.546296296296296;0.648148148148148;0.750000000000000;0.851851851851852;0.953703703703704;1.04629629629630;1.14814814814815;1.25000000000000;1.35185185185185;1.45370370370370;1.55555555555556;1.64814814814815;1.75925925925926;1.85185185185185;1.95370370370370;2.05555555555556;2.15740740740741;2.25925925925926;2.36111111111111;2.46296296296296;2.55555555555556;2.65740740740741;2.75925925925926;2.86111111111111;2.96296296296296]
y2=[303.027108286640;189.573565240637;118.597101233767;74.1942707212287;44.4782967612764;27.8255940220712;18.1659978837533;11.8597101233767;7.74263682681127;5.50478980785497;3.44379298497699;2.44843674682223;1.66810053720006;1.18597101233767;0.774263682681127;0.574459292824591;0.408423865267452;0.278255940220712;0.189573565240638;0.129154966501488;0.0918254283565628;0.0710970943231244;0.0484378864954104;0.0344379298497699;0.0278255940220712;0.0197831888278416;0.0146779926762207;0.0108902296226373]
y2pos=[1406.52724210524;1043.56262977539;807.992644838296;599.484250318941;444.782967612763;344.379298497699;255.509709035251;197.831888278416;153.174046370208;123.763502847248;95.8255854960264;77.4263682681127;62.5599360771763;48.4378864954104;37.5036963792269;31.6227766016838;25.5509709035251;20.6449965585256;15.9846710643432;12.9154966501488;10.4356262977539;8.79922543569107;6.81292069057961;5.74459292824590;4.84378864954104;4.08423865267452;3.30003479112528;2.78255940220712]
y2neg=[1237.63502847248;918.254283565629;681.292069057962;505.479682119124;375.036963792269;278.255940220712;215.443469003188;166.810053720006;129.154966501488;104.356262977539;80.7992644838296;65.2852114112785;50.5479682119124;40.8423865267452;31.6227766016838;26.6640383893971;21.5443469003188;17.4076738333024;13.4781296490846;10.8902296226373;8.79922543569107;7.41942707212287;5.74459292824590;4.84378864954104;4.08423865267452;3.44379298497699;2.78255940220712;2.34622884814226]
i=0;
for pt=0.01:0.01:4.5
i=i+1;
mt=sqrt(pt^2+m0^2);
j=0;
for r=0.01:0.01:R
j=j+1;
rho=atanh(0.5*beta*(n0+2)*(r/R)^n0);
w=pt*sinh(rho)/t0;
z=mt*cosh(rho)/t0;
Q(j)=pt*mt*r*besseli(0,w)*besselk(1,z)*0.01;
end
y10(i)=sum(Q);
end
pt=[0.01:0.01:4.5];
y11=y10./sum(y10);
y12=4550*y11./pt;
x2i=x2
y2i=interp1(pt,y12,x2i)
kafa=y2./y2i
scatter(x2,kafa)
c=y2pos-y2neg
%errorbar(x2,kafa,y2pos,y2neg,'o')
c is the error and i wanna put it on kafa by putting the above errorbar to the scatterred points.but there is a problem.if i dont put errorbar then the experimetal and theoritical scale range is alright which is 0.5-1.5.but when i put the errorbar then i shows something different....
  댓글 수: 5
Stephen23
Stephen23 2018년 1월 29일
waqas muhammad's "Answer" moved here:
sir i need to put the error to kafa(each point). if i dont put the error then the plot is correct according to the scale but if i put error then the plot scale changes. and the second problem my plot should be like this... but gives me the plot like this by putting errorbar..
Walter Roberson
Walter Roberson 2018년 1월 29일
I had edited the original post to format the code so my name would have shown up but there would have been no answer from me.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Errorbars에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by