Why does it gives matrix dimension must agree?

1 次查看(过去 30 天)
i am trying to plot this equation: x=0.011*V+(1.3e-5*V/R^2)
program:
R=3e-7:1e-7:10e-7;
V=0.5;
Vth=0.011*V+(1.3e-5*V/R.^2);
plot(R,Vth);

采纳的回答

Mischa Kim
Mischa Kim 2014-5-27
编辑:Mischa Kim 2014-5-27
Anwesha, use
R = 3e-7:1e-7:10e-7;
V = 0.5;
Vth = 0.011*V + (1.3e-5*V./R.^2); % note the dot in front of / sign
plot(R,Vth);

更多回答(1 个)

rifat
rifat 2014-5-27
You are not dividing element by element. Use the following lines instead:
R=3e-7:1e-7:10e-7;
V=0.5;
Vth=0.011*V+(1.3e-5*V./R.^2);
plot(R,Vth);

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by