Azzera filtri
Azzera filtri

simple code error, help me please

3 visualizzazioni (ultimi 30 giorni)
whiyan
whiyan il 26 Ott 2020
Modificato: Rik il 26 Ott 2020
v = 0:3;
w = sqrt(2*11.9*(8.85*10^-14)*((10^16)+(10^18))*(0.817+v)/((1.6*10^-19)*(10^16)*(10^18)));
c = ((40*10^-4)*(0.6*10^-4)*(11.9*8.85*10^-14)/w)+((((40*10^-4)+(2*0.6*10^-4))*(0.15*10^-4)*(11.9*8.85*10^-14))/w);
plot(v,c)
above is the code, but it has errors like the follows.
error: operator /: nonconformant arguments (op1 is 1x1, op2 is 1x4)
error: 'c' undefined near line 1, column 1

Risposta accettata

Stephan
Stephan il 26 Ott 2020
v = 0:3;
w = sqrt(2*11.9*(8.85*10^-14)*((10^16)+(10^18))*(0.817+v)./((1.6*10^-19)*(10^16)*(10^18)));
c = ((40*10^-4)*(0.6*10^-4)*(11.9*8.85*10^-14)./w)+((((40*10^-4)+(2*0.6*10^-4))*(0.15*10^-4)*(11.9*8.85*10^-14))./w);
plot(v,c)

Più risposte (0)

Categorie

Scopri di più su Vector Fields in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by