How can I use an if statement to compare an input in a function script?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jane Akintoye
le 24 Juil 2018
Commenté : Jane Akintoye
le 24 Juil 2018
How can I get this If statement to work? why doesn't it work in the first place?
0 commentaires
Réponse acceptée
OCDER
le 24 Juil 2018
Your cell_num_mem_1 was never defined before the if statement. What is the value of this variable, or is it a function that returns a value?
p = 1;
cell_num_mem_1 = ???? %define a value here
if p == cell_num_mem_1
disp('if statement worked')
end
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Report Generator 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!