| 查看: 426 | 回复: 2 | ||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | ||
[求助]
MATLAB编程问题 已有1人参与
|
||
|
dt=0.0001; t=0:dt:0.5; R=1000000;S=58.0644*10^(-4);B=8.8541878*10^(-12);v=0.1;d=125/3400000;A=10*10^(-6);a=1;n=0.05; z1=exp((1/R*S*B)*(d.*t+1/6*a.*t.^3)); z2=exp((1/R*S*B)*(d*t+0.5*sqrt(a*n).*t.^2-1/6*a.*t.^3)); I1=-(A*d/(R*B))+((A*(d+0.5*a.t^2))/(R*B))*exp((-1/(R*S*B))*(d.*t+(1/6)*a.*t.^3))+(A*d/(R*B))*((d+0.5*a.*t.^2)/(R*B*S))*exp(-(1/(R*S*B))*(d*t+(1/6)*a.*t.^3)).*cumtrapz(z1)*dt; I2=-(A*d/(R*B))+((A*(d+sqrt(a*n).*t-0.5*a.*t.^2))/(R*B))*exp((-1/(R*S*B))*(d.*t+0.5*sqrt(a*n).*t^2-(1/6)*a.*t.^3))+(A*d/(R*B))*((d+sqrt(a*n).*t-0.5*a.*t.^2)/(R*B*S))*exp(-(1/(R*S*B))*(0.5*sqrt(a*n).*t^2-(1/6)*a.*t.^3)).*cumtrapz(z2)*dt; y=I1.*(t<=sqrt(n/a)&t>=0)+I2.*(t<=2*sqrt(n/a)&t>sqrt(n/a)); plot(t,y) Attempt to reference field of non-structure array. 这个问题怎么解决???? |
» 猜你喜欢
国家基金申请书模板内插入图片不可调整大小?
已经有9人回复
退学或坚持读
已经有20人回复
免疫学博士有名额,速联系
已经有14人回复
面上基金申报没有其他的参与者成吗
已经有4人回复
多组分精馏求助
已经有6人回复
国家级人才课题组招收2026年入学博士
已经有6人回复
3楼2016-08-16 10:25:32
【答案】应助回帖
感谢参与,应助指数 +1
|
I1,I2里面很多格式错误,重点搞清楚什么时候要矩阵点运算,下面代码是修改过的I1,I2: I1=-(A*d/(R*B))+((A*(d+0.5*a.*t.^2))/(R*B)).*exp((-1/(R*S*B))*(d.*t+(1/6)*a.*t.^3))+(A*d/(R*B))*((d+0.5*a.*t.^2)/(R*B*S)).*exp(-(1/(R*S*B))*(d*t+(1/6)*a.*t.^3)).*cumtrapz(z1)*dt; I2=-(A*d/(R*B))+((A*(d+sqrt(a*n).*t-0.5*a.*t.^2))/(R*B)).*exp((-1/(R*S*B))*(d.*t+0.5*sqrt(a*n).*t.^2-(1/6)*a.*t.^3))+(A*d/(R*B))*((d+sqrt(a*n).*t-0.5*a.*t.^2)/(R*B*S)).*exp(-(1/(R*S*B))*(0.5*sqrt(a*n).*t.^2-(1/6)*a.*t.^3)).*cumtrapz(z2)*dt; |
» 本帖已获得的红花(最新10朵)
2楼2016-08-15 23:59:13













回复此楼
送红花一朵