Why is ascii2str not recognized in 2022a?

조회 수: 7 (최근 30일)
Daryl Lee
Daryl Lee 2022년 8월 13일
댓글: Daryl Lee 2022년 8월 13일
This clip fom the command window summarizes my question. I hav a new install of MATLAB 2022a on MacOS 12.4. Has something changed?
>> bytes = [0x57 0x58 0x53 0x54]
bytes =
1×4 uint8 row vector
87 88 83 84
>> str = ascii2str(bytes)
Unrecognized function or variable 'ascii2str'.
>>>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.12.0.2009381 (R2022a) Update 4
MATLAB License Number: 707564
Operating System: macOS Version: 12.4 Build: 21F79
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.12 (R2022a)
Fuzzy Logic Toolbox Version 2.9 (R2022a)
Statistics and Machine Learning Toolbox Version 12.3 (R2022a)
Symbolic Math Toolbox

답변 (1개)

Steven Lord
Steven Lord 2022년 8월 13일
According to the documentation "The operator ascii2str is supported only in Stateflow® charts that use C as the action language."
In MATLAB the equivalent is the char function.
bytes = [0x57 0x58 0x53 0x54]
bytes = 1×4
87 88 83 84
c = char(bytes)
c = 'WXST'

카테고리

Help CenterFile Exchange에서 Simulation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by