How do I use an "if" statement to determine the highest input value?

3 ビュー (過去 30 日間)
Jason
Jason 2023 年 10 月 2 日
コメント済み: Dyuman Joshi 2023 年 10 月 2 日
I'm doing a project and it requires the user to state how many books they are buying and the price of each book. However, one of the remarks is that the buyer would be able to apply a discount to their most expensive book.
I need to use an "if" statement to determine the highest value from the inputs.
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 10 月 2 日
As Alan Stevens has mentioned, take a look at the documentation - if, elseif, else
If you still have any doubts/queries/problems, show the code you have attempted to solve the problem and specify where you are having trouble.

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

回答 (1 件)

Alan Stevens
Alan Stevens 2023 年 10 月 2 日

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by