I apparently don't know how to use the {}code button to format the question and I need help with this 3 variable logical AND operation

3 vues (au cours des 30 derniers jours)
function andResult = LogicalAND3(inputA, inputB, inputC)
% Assign threeInputAnd with the truth table outcomes for a
% 3 variable logical-and operation
andResult = [inputA], [inputB], [inputC];
end
  2 commentaires
per isakson
per isakson le 11 Oct 2017
Modifié(e) : per isakson le 11 Oct 2017
This homework(?) is it about expanding Truth Table for Logical Operations to three inputs?
per isakson
per isakson le 11 Oct 2017
Modifié(e) : per isakson le 11 Oct 2017
"I apparently don't know how to use the {}code button to format the question"
The requirements to show a block of text as code are
  • the block shall be preceded by an empty line
  • each line of the block shall be preceded by two extra spaces
  • the block shall be followed by an empty line
The {}Code button adds those extra two spaces and the preceding empty line, but not the closing empty line. Steps
  • type the block of text or copy&paste it from the editor
  • select the block so that it's displayed in white on a blue background
  • push the {}Code button
  • make sure there is a closing empty line

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 11 Oct 2017
function andResult = LogicalAND3(inputA, inputB, inputC)
% Assign threeInputAnd with the truth table outcomes for a
% 3 variable logical-and operation
andResult = inputA & inputB & inputC ;
end

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by