Using cell array to define double

1 vue (au cours des 30 derniers jours)
Luigi
Luigi le 24 Mai 2024
Commenté : Stephen23 le 24 Mai 2024
Normally I create a 1x1 double as follows:
mydouble=1;
Now, say I create a cell array:
mycell = {'mydouble'}
I want to create the 1x1 double mydouble equal to 1 using the object mycell. How can I do that?
  2 commentaires
Fangjun Jiang
Fangjun Jiang le 24 Mai 2024
Modifié(e) : Fangjun Jiang le 24 Mai 2024
mydouble=1;
mycell = {mydouble}
mycell = 1x1 cell array
{[1]}

Connectez-vous pour commenter.

Réponses (1)

Torsten
Torsten le 24 Mai 2024
Déplacé(e) : Torsten le 24 Mai 2024
mydouble = 1;
mycell{1} = mydouble
mycell = 1x1 cell array
{[1]}

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by