Question: MATLAB coding help please! I tried creating an if/else, but I wasn't able to get it to work. Lie detector output converter A lie detector
MATLAB coding help please! I tried creating an if/else, but I wasn't able to get it to work.
Lie detector output converter
A lie detector returns the string 'truth' or 'lie' based on the result of each question posed. Assign testValue with a 1 if userResult is 'truth'. Otherwise, assign testValue with a 0.
Ex: If userResult is 'truth', then testValue is 1.
YOUR FUNCTION
function testValue = OutputConverter(userResult)
testValue = 0;
end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
