Info

この質問は閉じられています。 編集または回答するには再度開いてください。

MAT Lab Basics. I need to know who to do these six things below.

1 回表示 (過去 30 日間)
Robert Boyle
Robert Boyle 2019 年 10 月 9 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I just need to know how to do these six things.
1. Find the largest number between two numbers
2. Find the largest number between three numbers
3. Review if three given numbers are in ascending order
4. Sum the numbers between two given numbers (inclusive)
5. Review if a number is a multiple of other number
6. Review if a number is a prime number
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 10 月 10 日
if A < B & A < C
smallest is A
elseif A > B & A < C
Smallest is?
elseif A < B & A > C
Smallest is?
elseif A > B & A > C
Smallest is?
else
Smallest is?
end
There are 6 possibilities that you can test one after the other.

回答 (1 件)

Samatha Aleti
Samatha Aleti 2019 年 10 月 15 日
You can use functions like “isprime,”divisors”, “sort” to perform required operations. Following are the documentation links to each of these functions:

Community Treasure Hunt

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

Start Hunting!

Translated by