Hi, I've been given this question as part of my Programming for Mathematics module and have no idea how to do it.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ahoora Saadat
am 29 Sep. 2016
Beantwortet: KSSV
am 29 Sep. 2016
Write a function EitherOr with the first line function z = EitherOr(x,y) that takes two truth values x and y, and returns true whenever exactly one of the inputs x and y is true, and returns false otherwise. For example, EitherOr(3>1,4>2) should return 0 but EitherOr(3>1,4<2) should return 1. One can write this function without using an if-block.
0 Kommentare
Akzeptierte Antwort
KSSV
am 29 Sep. 2016
Refer:
https://in.mathworks.com/help/matlab/matlab_prog/truth-table-for-logical-operations.html
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!