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

조회 수: 1 (최근 30일)
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.

채택된 답변

Walter Roberson
Walter Roberson 2020년 3월 17일
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
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2020년 3월 17일
It does not return the interested matrix:
isCategoricalPrd = false(1,5)
isCategoricalPrd =
1×5 logical array
0 0 0 0 0

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by