Issue with calling variables through multiple functions, not enough input arguments
Mostra commenti meno recenti
Hi all, I'm still farily inexperienced with matlab. I am trying to break up an equation into smaller parts (the 4 functions) to make it easier to check/modify when I integrate the Gammasigma function but I keep getting 'not enough input arguments,' and the error lists every function as part of the error. I know that I am doing something wrong with the variable calls but I am not sure what specifically my issue is or how to fix it.
syms Egam
ECrit = 5;sigmaT = 1; me = 510;
compton1 = vpaintegral(Gammasigma,Egam,15,30);
compton2 = vpaintegral(Gammasigma,Egam,11,30);
compton = compton1/compton2;
function Gs = Gammasigma(Egam,ECrit,sigmaT,me)
Gs = (exp(-exp(-((log(Egam)+1.2)./(.8)))-((log(Egam)+1.2)./(.8))+1)).*s3;
end
function sigma3 = s3(Egam,ECrit,sigmaT,me)
sigma3 = s2+(3.*sigmaT)./(8).*(1)./(((Egam)./(me)).^3).*(1-((Egam)./(me))-(1+2.*((Egam)./(me)))./(1+((Egam)./(me)) ...
.*(1-(1-(me)./(Egam).*((ECrit)./(Egam))./(1-(ECrit)./(Egam)))))-((Egam)./(me)).*(1-(me)./(Egam).*((ECrit)./(Egam))./(1-(ECrit)./(Egam))));
end
function sigma2 = s2(Egam,ECrit,sigmaT,me)
sigma2 = s1+(3.*sigmaT)./(8).*(1)./(2.*((Egam)./(me))).*((1)./(1+((Egam)./(me)).*(1-(1-(me)./(Egam).*((ECrit)./(Egam)) ...
./(1-(ECrit)./(Egam))))).^2-(1)./(1+2.*((Egam)./(me))).^2);
end
function sigma1 = s1(Egam,ECrit,sigmaT,me)
sigma1 = (3.*sigmaT)./(8).*((((Egam)./(me)).^2-2.*((Egam)./(me))-2)./(((Egam)./(me)).^3).*log((1+2.*((Egam)./(me))) ...
./(1+((Egam)./(me)).*(1-(1-(me)./(Egam).*((ECrit)./(Egam))./(1-(ECrit)./(Egam)))))));
end
Any help would be greatly appreciated!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Calculus in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!