Info
此问题已关闭。 请重新打开它进行编辑或回答。
showing error like Attempt to reference field of non-structure array?/
2 次查看(过去 30 天)
显示 更早的评论
hello this is my code to plot a simple graph for (d and E). but it is showing this error like this.i cant rectify this.
d=0:10:40;
r=0.5;
q1=2.65;
E0=8.85*10^-12;
E1=60;
b1 =(d./r).^(2/3);
E2=E1./b1;
E3= E2.(d+r).^2/(2*r.^2);
S=d./r;
u1=E0.*E2.^2./(2);
u= E0.*E1^.2.*(S+2/4);
a1=d.^2;
a2=1.5.*a1;
q=a2.*q1./(a2+a1);
u3=u./q;
e2=S./4;
e1=S./2;
V2=E1.*d.*e1;
c=E0.*e2./(d.^2.*e2.^2);
plot(d,u)
1 个评论
回答(1 个)
Amit
2014-1-30
d=0:10:40;
r=0.5;
q1=2.65;
E0=8.85*10^-12;
E1=60;
b1 =(d./r).^(2/3);
E2=E1./b1;
E3= E2.*(d+r).^2/(2*r.^2);
S=d./r; u1=E0.*E2.^2./(2);
u= E0.*E1^.2.*(S+2/4); % You forgot to put the multiplication '*' in your code.
a1=d.^2;
a2=1.5.*a1;
q=a2.*q1./(a2+a1);
u3=u./q;
e2=S./4;
e1=S./2;
V2=E1.*d.*e1;
c=E0.*e2./(d.^2.*e2.^2);
plot(d,u)
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!