Azzera filtri
Azzera filtri

Why is ascii2str not recognized in 2022a?

9 visualizzazioni (ultimi 30 giorni)
Daryl Lee
Daryl Lee il 13 Ago 2022
Commentato: Daryl Lee il 13 Ago 2022
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

Risposte (1)

Steven Lord
Steven Lord il 13 Ago 2022
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'

Categorie

Scopri di più su Debugging and Analysis in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by