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 .
MATLAB Release Compatibility
Created with
R2016b
Compatible with R2016b and later releases
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
