While executing this program i am getting Error using symengine Operands are invalid. Error in sym/privBinaryOp (line 973) Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:}); Error in / (line 353) X = privBinaryOp(A, B, 'sy
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
syms E
ec=1.6*10^(-19);
del= 1.3*10^(-3)*ec;
k= 1.3807*10^(-23);
T=1.5;
V= linspace(0,5);
i=int((abs(E))/(sqrt(E.^2-del.^2))*(1/(1+exp((E-ec.*V)/(k.*T))-1/(1+exp(E./(k.*T))))), E, -inf, -1*del)
+ int((abs(E))/(sqrt(E.^2-del.^2))*(1/(1+exp((E-ec.*V)/(k.*T))-1/(1+exp(E./(k.*T))))), E, del, inf);
plot(V,i);
1 commentaire
Rishabh Yadav
le 28 Avr 2018
@Arjun Garva
I am facing the same error on my code. Did you find any solution to this?
Réponses (2)
Ameer Hamza
le 28 Avr 2018
You are getting this error because you are dividing 1 by 1x100 sym array, by using / symbol. You need to use ./ notation for the element-wise division. Inside the int change
(1/(1+exp((E-ec.*V)/(k.*T))-1/(1+exp(E./(k.*T)))))
to
(1./(1+exp((E-ec.*V)/(k.*T))-1/(1+exp(E./(k.*T)))))
0 commentaires
Walter Roberson
le 28 Avr 2018
You are creating a vector of values. You need to use ./ instead of /
However, the left side of the addition, the integral from negative infinity, gives an infinite result for all V, and the right side of the addition, the integral to +infinity, gives 0 for all V.
0 commentaires
Voir également
Catégories
En savoir plus sur Calculus 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!