Hi, I've been given this question as part of my Programming for Mathematics module and have no idea how to do it.
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
KSSV
2016년 9월 29일
Refer:
https://in.mathworks.com/help/matlab/matlab_prog/truth-table-for-logical-operations.html
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!