String representation of any data type

버전 1.6 (6.54 KB) 작성자: Rody Oldenhuis
Generate string representations of all MATLAB data types and user-defined classes.
다운로드 수: 490
업데이트 날짜: 2020/5/2

TOSTRING implements an often-requested feature that is not built into MATLAB: represent some data as a string.
Supported and tested data types (of any dimension):
- double
- single
- logical
- char
- (u)int[X]
- cell
- struct
- function_handle
- user-implemented classes
The default string representation is as verbose as possible, meaning that the contents of structure fields, cell array entries, etc. are represented in fully expanded form.
S = TOSTRING(A, 'disp') produces a string representation that is identical to what the command 'disp(A)' would produce.

S = TOSTRING(A, 'compact') or S = TOSTRING(A, N) (with N a positive integer) limits the number of digits displayed in numerical arrays to either 4 ('compact') or N. A warning is issued when applied to a non-numeric array. Note that this setting also affects how enumeration classes are displayed; when this option is used, only the currently selected enumeration value will be shown, rather than the complete class.

Please report any bugs, suggestions or requests to one of the e-mail addresses mentioned in the function header.

인용 양식

Rody Oldenhuis (2024). String representation of any data type (https://github.com/rodyo/FEX-toString/releases/tag/v1.6), GitHub. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.6

See release notes for this release on GitHub: https://github.com/rodyo/FEX-toString/releases/tag/v1.6

1.5.0.0

[linked to Github]
Description update

1.4.0.0

Small doc change to better clarify scope of the function

1.3.0.0

CHANGED:
- Removed constructor from enum types, as it cannot be called directly
- Made enum types respond differently to "compact" notation

FIXED:
- 2 bugs related to treatment of integers (see changelog)

1.2.0.0

Just forgot to update the description field in the field above; fixed.

1.1.0.0

- Improvements to the display of enumerated types as kindly suggested by Clark Williams (thank you!)
- Implemented support for sparse matrices

1.0.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.