Info
This question is closed. Reopen it to edit or answer.
showing error like Attempt to reference field of non-structure array?/
1 view (last 30 days)
Show older comments
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 Comment
Answers (1)
Amit
on 30 Jan 2014
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 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!