Functions istext iscelltext

Versión 1.0.0 (2,74 KB) por Bill Whiten
Test for char or string variables; Test for cell array of char or string variables.
20 descargas
Actualizado 26 sep 2018

Ver licencia

Most function now allow either char of string variables.
However missing are functions to test for either string or char,
and to test for a cell array containing only string or char values.

Two functions v=istext(x) and v=iscelltext(x) are included or
can be used inline as:

istext=@(x)isstring(x)|ischar(x);
iscelltext=@(x)all(cellfun(@(y)isstring(y)|ischar(y),x,'UniformOutput',1));

Citar como

Bill Whiten (2024). Functions istext iscelltext (https://www.mathworks.com/matlabcentral/fileexchange/68918-functions-istext-iscelltext), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2018b
Compatible con cualquier versión desde R2016b
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Test Scripts en Help Center y MATLAB Answers.
Etiquetas Añadir etiquetas
Agradecimientos

Inspiración para: Optional function arguments

Community Treasure Hunt

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

Start Hunting!

istext_iscelltext

Versión Publicado Notas de la versión
1.0.0