simple code error, help me please

8 Ansichten (letzte 30 Tage)
whiyan
whiyan am 26 Okt. 2020
Bearbeitet: Rik am 26 Okt. 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

Akzeptierte Antwort

Stephan
Stephan am 26 Okt. 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)

Weitere Antworten (0)

Kategorien

Mehr zu Vector Fields finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by