How to get a logical output if all the arrays of a matrix are NAN and the matrix is a string

1 visualización (últimos 30 días)
Hello
The matrix, F I have is:
F =
1×8 string array
"NA" "NA" "NA" "NA" "NA" "NA" "NA" "NA"
I want to write a line of code such that produce a logical value of 1 if all the arrays of F are NA.
How should I do this?

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 15 de Sept. de 2022
F=["NA" "NA" "NA" "NA" "NA" "NA" "NA" "NA"];
all(F=="NA")
ans = logical
1

Más respuestas (0)

Categorías

Más información sobre Numeric Types en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by