Why does it gives matrix dimension must agree?

1 回表示 (過去 30 日間)
ANWESHA
ANWESHA 2014 年 5 月 27 日
編集済み: Mischa Kim 2014 年 5 月 27 日
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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by