Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 工程数学软件 > MATLAB论坛
MATLAB论坛 一切MATLAB相关问题在此讨论。
 
 
主题工具 显示模式
旧 2012-12-13, 20:54   #1
ffxx991234
初级会员
 
注册日期: 2012-12-13
年龄: 38
帖子: 1
声望力: 0
ffxx991234 正向着好的方向发展
帖子 编子函数:求解二阶微分方程后求导取值 subs函数运行部通,高手请进

function [JJ,EQE1]=Jphoton(GG1)
QQ1=1e10
c=299792458 % velocity of light
l1=10e-9 % exction diffusion length of CuPc is 10nm
l2=20e-9 % exction diffusion length of C60 is 20nm
Qe=1 % quantum efficiency of the exction generation
t=1e-9 % lifetime of exction approximately is 1ns
s=88.54187818e-13 % vacuum permittivity
y=dsolve('l1*D2y-y+t*GG1=0','y(20e-9)=0,y(0)=0','x')


% the short-circuit extion current density at the interface x=xd/a
%计算光电流,外量子效率子函数

s1=1 % s1 is the efficiency of extion dissociation at the interface
s2=1 % s2 is the efficiency of charge collection at the electrode
q=1.6e-19 % the unit of quantity of electricity
Jphoton=-q*s1*s2*l1*l1*diff(y)/t
x=20e-9
JJ=subs(Jphoton)
EQE1=2*JJ/q/c/s

end

报错
??? Error using ==> sym.subs
Elements of the substitution cell array must be of the same size.



GG1是输入的数组,要计算出JJ,EQE1

如何改下比较好?

十分感谢
ffxx991234 当前离线   回复时引用此帖
 


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为北京时间。现在的时间是 08:54


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.