Effacer les filtres
Effacer les filtres

how to change the logical type matrix into other type

1 vue (au cours des 30 derniers jours)
SHUNSUKE YAMANAKA
SHUNSUKE YAMANAKA le 19 Oct 2017
Commenté : Stephen23 le 19 Oct 2017
Dear Sir or Madam,
I would like to change the logical type matrix into other type ( double , boolean...). But , I can't change it. Otherwise , I tried by using typecast command.
I'm pleased if you let me know.
Sincerely,
  1 commentaire
Stephen23
Stephen23 le 19 Oct 2017
MATLAB does not have a booelan type.

Connectez-vous pour commenter.

Réponse acceptée

Stephen23
Stephen23 le 19 Oct 2017
Modifié(e) : Stephen23 le 19 Oct 2017
double(M)
where M is your logical matrix. For example:
>> M = [true,false,true]
M =
1 0 1
>> double(M)
ans =
1 0 1

Plus de réponses (0)

Catégories

En savoir plus sur 数値型 dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!