Why is ascii2str not recognized in 2022a?
8 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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]
c = char(bytes)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!