Logical operators and arrays 3input and truth table Given th

Logical operators and arrays: 3-input and truth table Given three 1D arrays (inputA, inputB, inputc), assign 1D array andResult with the outcomes of a3 Your Solution % 3 variable logical-and operation end Run Your Solution C Reset 10

Solution

function andResult = LogicalAND3( inputA,inputB,inputC )
for i=1:size(inputA,2)
inputA(i)=inputA(i)&inputB(i)&inputC(i);
end
andResult = inputA;

end

Program:

Result:

>> LogicalAND3([0,0,1],[0,1,1],[1,1,1])

ans =

0 0 1

>> LogicalAND3([1,1,1,1],[1,1,1,1],[0,1,1,1])

ans =

0 1 1 1

 Logical operators and arrays: 3-input and truth table Given three 1D arrays (inputA, inputB, inputc), assign 1D array andResult with the outcomes of a3 Your So

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site