simple code error, help me please

7 views (last 30 days)
whiyan
whiyan on 26 Oct 2020
Edited: Rik on 26 Oct 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

Accepted Answer

Stephan
Stephan on 26 Oct 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)

More Answers (0)

Categories

Find more on Vector Fields in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!