Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

3 Ansichten (letzte 30 Tage)
Robert Boyle
Robert Boyle am 9 Okt. 2019
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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 Kommentar
Walter Roberson
Walter Roberson am 10 Okt. 2019
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.

Antworten (1)

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

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by