Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

showing error like Attempt to reference field of non-structure array?/

1 visualizzazione (ultimi 30 giorni)
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)

Risposte (1)

Amit
Amit il 30 Gen 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)

Questa domanda è chiusa.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by