logical2char

Convert a logical array to character array

You are now following this Submission

LOGICAL2CHAR Convert a logical array to character array
S = LOGICAL2CHAR(C) constructs S by converting each logical value to
either '0' or '1'. It is a simple set of code that has been made into a
function for easier use.
Examples:
c = [true , false , true];
S = logical2char(c);
Output:
S =
101
See other functions that are also available on MATLAB Exchange such as:
STRUCT2CHAR, FIND_IN_CELLS
Copyright 2021-2037 Mukund Iyer

Cite As

Mukund Iyer (2026). logical2char (https://www.mathworks.com/matlabcentral/fileexchange/103560-logical2char), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with R2016b and later releases

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0