How do I generate a string during a loop

1 vue (au cours des 30 derniers jours)
Kevin  Hartman
Kevin Hartman le 1 Nov 2017
Commenté : Kevin Hartman le 2 Nov 2017
I'm looking to generate a string, such as 'grape', when a certain value, say, 0.5, is encountered during a loop. How do I do this?
  3 commentaires
Eric
Eric le 2 Nov 2017
if value==0.5
'grape'
end
If you want to actually do something with it, save it in a variable. Not sure what you want to do with the 'grape' string.
Kevin  Hartman
Kevin Hartman le 2 Nov 2017
Thank you, this will work.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by