This is my Matlab Script file. Whenever,I run the script, it shows runtime error. What is the error in this script? Thanks
5 views (last 30 days)
G=G0*int(cos(phi)*Tb ,-pi/2, pi/2);
title('Conductivity as a fxn of barrier width D for bilayer');
Walter Roberson on 12 Apr 2016
Your D is a vector. Your D is defined in terms of D so T is a vector. Your Tb is defined in terms of T so Tb is a vector. cos(phi)*Tb is therefore a vector. You are trying to int() a vector. That might be a problem, but possibly not. You would be safer doing the elements one by one.
More of a problem is that your expressions to be integrated are messy, and probably closed form integrals do not exist. You might want to switch to numeric integrals. If you do, you will need to do the elements one by one for sure.
Your integral requires high precision to evaluate at all meaningfully; you are not going to be able to evaluate it using integral(). When I evaluate at 5000 digits, I still see spikes as if there were singularities in the denominator -- but algebraically there are no singularities in the denominator. I am checking now about oddities in the numerator.