Skip to main content
added 56 characters in body
Source Link

Octave (1515 23)

EDIT: Updated due to user input requirement;

~mod(log2(ainput('')),1)

Input value inLets the user input a (or replace in formula). Outputsvalue and outputs 1 for true, 0 for false.

Tested in Octave, should work in Matlab also.

Octave (15)

~mod(log2(a),1)

Input value in a (or replace in formula). Outputs 1 for true, 0 for false.

Tested in Octave, should work in Matlab also.

Octave (15 23)

EDIT: Updated due to user input requirement;

~mod(log2(input('')),1)

Lets the user input a value and outputs 1 for true, 0 for false.

Tested in Octave, should work in Matlab also.

Source Link

Octave (15)

~mod(log2(a),1)

Input value in a (or replace in formula). Outputs 1 for true, 0 for false.

Tested in Octave, should work in Matlab also.