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 Ansichten (letzte 30 Tage)
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 Kommentare
per isakson
per isakson am 11 Okt. 2017
Bearbeitet: per isakson am 11 Okt. 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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KSSV
KSSV am 11 Okt. 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

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by