Array Indices(dont understannd the problem the value is a basic exponantial function)

1 回表示 (過去 30 日間)
Bilal Ismail
Bilal Ismail 2019 年 10 月 18 日
回答済み: Steven Lord 2019 年 10 月 18 日
dont understannd the problem the value is a basic exponantial function
vds=1:0.1:5;
t=1.12;
idss=18;
x=vds/t;
ids=idss(1-exp((x)))
plot(vds,ids)

回答 (1 件)

Steven Lord
Steven Lord 2019 年 10 月 18 日
idss is a variable with only one element. The expression idss(1-exp((x))) is an attempt to access one or more elements from that variable. The only valid index into idss is 1 (since it has only one element) and for 1-exp(x) to result in a value of 1, x must be -Inf (or something that causes exp(x) to underflow to 0.)
If you meant to multiply the variable idss and the value of the expression 1-exp(x), you need to specify the multiplication explicitly by putting .* between those two terms.

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by