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 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Rishabh Yadav
il 28 Apr 2018
@Arjun Garva
I am facing the same error on my code. Did you find any solution to this?
Risposte (2)
Ameer Hamza
il 28 Apr 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 Commenti
Walter Roberson
il 28 Apr 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 Commenti
Vedere anche
Categorie
Scopri di più su Calculus in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!