68 marks People Window Help r Dashboard kUSFEGN4453PierreFa
68% . marks People Window Help r Dashboard k/USFEGN4453PierreFall2016/chapter/8/section/4 9 Home l Chegg.com chelenge 8.4.3: Genetic markers test. , 8.4.3: Genetic markers This chalange actvty ues a 3rd party app Though your actity may be eoordod, rtrooh moy oe red to upliste he barner to he et Genetic markers test Assign testlesult with 1 either geneticMarkerA is 1 or geneticMarkerB is 1, geneticMarkerA and geneticMarkerB are both 1, then assign tostResult with 0 Ex If genetcMarkerA is 1 and genescMarkerB is 0, then testFResultis assigned with 1.If gerveticMarkerA is 1 and geneticMarkerß is 1, then testResult is assigned with O. Your Solution save CReset MATLAB Documentation function testResult CheckTest(geneticharkerA, geneticHarkerB) s geneticRarkerA: Resutt of test for marker A % geneticMarkerA: Result of test for marker B s Write a statenent that assign assign testResult with 1 i either genet icMarkerA is 1 er geneticMarkerB is 1 it (geneticMarkerA-1) I (geneticMarkerB-1 testResult 1 9 else testResult- 12end Run Your Solution Code to call your function when you click Run 1 CheckTest(1, ) C Reset Feedback? 8.5 Swtch
Solution
% matlab code
function testResult = CheckTest(geneticMarkerA, geneticMarkerB)
if (geneticMarkerA == 1 && geneticMarkerB == 1)
testResult = 0;
elseif (geneticMarkerA == 0 && geneticMarkerB == 0)
testResult = 0;
else
testResult = 1;
end
end
disp(CheckTest(1,0));
% output: 1
disp(CheckTest(1,1));
% output: 0
disp(CheckTest(0,0));
% output: 0
disp(CheckTest(0,1));
% output: 1
