What type of data is this isCategoricalPrd = [false, false, false, false, false];? the members of this matrix are not character nor string.

1 Ansicht (letzte 30 Tage)
Here is the matrix
isCategoricalPrd = [false, false, false, false, false];
I want to know the type of matrix members and how to make this matrix systematically like in neumerical matrices "zeros" or "ones" are used so that I can make them with any size.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 17 Mär. 2020
false and true are datatype named logical
true(1,5)
false(1,5)
ones(1,5,'logical')
zeros(1,5,'logical')
logical(ones(1,5))
logical(zeros(1,5))
  4 Kommentare
Zeynab Mousavikhamene
Zeynab Mousavikhamene am 17 Mär. 2020
It does not return the interested matrix:
isCategoricalPrd = false(1,5)
isCategoricalPrd =
1×5 logical array
0 0 0 0 0

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by