if statement - working with characters
82 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ojaswita
le 23 Sep 2013
Commenté : Gwangil Mun
le 26 Nov 2022
I am executing the following code:
x = inputdlg({'Month', 'Population renewal', 'Death rate'}, 'Inputs')
f = getfield(x,{1});
if (f == 'January')
b = 0.5
else
b = 0.7
end
and I am getting an error that says "??? Undefined function or method 'eq' for input arguments of type 'cell'"
Please do tell me where I am going wrong....
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Characters and Strings 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!