作业帮 > 综合 > 作业

matlab我编的这个函数哪里错了

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/10 04:43:02
matlab我编的这个函数哪里错了
function Y= = R(j,ER )
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
E=-0.0+j*0.000000001;
e=1.6*10^-19;k=1.3806505*10^-23;T=0.1;VL=-0.1;h=6.62*10^-34;
Y=1/((exp((E-e*ER)/(k*T)))+1);
end
它说
Error:File:R.m Line:1 Column:13
The expression to the left of the equals sign is not a valid target for an assignment.
function Y=R(j,ER )
%UNTITLED3 Summary of this function goes here
% Detailed explanation goes here
E=-0.0+j*0.000000001;
e=1.6*10^(-19);k=1.3806505*10^(-23);
T=0.1;
% VL=-0.1;
% h=6.62*10^(-34);
Y=1/((exp((E-e*ER)/(k*T)))+1);
end
你的错误太多,大概改了一下,VL ,h 在函数中就没用,认真看看吧.
再问: 除了有没用上的还有没有其他错误?没用上的是不是就不允许出现?