why does this code return that my variable A is undefined when i run it? how can i change this?

function f=MSP_Asgn4_Q1_27012653(D,n,X)
if X==A
P=D*(1+(1.5/100)).^n;
end

1 件のコメント

Stephen23
Stephen23 2018 年 12 月 3 日
編集済み: Stephen23 2018 年 12 月 3 日
"why does this code return that my variable A is undefined when i run it?"_
Becaues you did not define A anywhere. Where is A defined? Nowhere.
"how can i change this?"
Define A before using it.

サインインしてコメントする。

 採用された回答

madhan ravi
madhan ravi 2018 年 12 月 3 日
編集済み: madhan ravi 2018 年 12 月 3 日
because you didn't define A
A=somevalue
if X==A

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

2018 年 12 月 3 日

編集済み:

2018 年 12 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by