program that returns random letter

12 Ansichten (letzte 30 Tage)
Cool007Monkey
Cool007Monkey am 28 Jan. 2018
Bearbeitet: Cool007Monkey am 30 Jan. 2018
program that returns random letter
  2 Kommentare
John D'Errico
John D'Errico am 28 Jan. 2018
Bearbeitet: John D'Errico am 28 Jan. 2018
Please don't delete your question. That insults the person who spent the time to answer it. It also makes it less likely that individual will bother to answer another of your questions.
You hurt Answers as a site, because it leaves meaningless answers, since there is no longer a question that they solve. And flagging your own question as spam is just foolishness. It looks like the question has been restored now, so this has been repaired.
Rena Berman
Rena Berman am 29 Jan. 2018
(Answers Dev) Restored edit

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Stephen23
Stephen23 am 28 Jan. 2018
Bearbeitet: Stephen23 am 28 Jan. 2018
char(randi([65,90]))
char(randi(+'AZ'))

Weitere Antworten (1)

Star Strider
Star Strider am 28 Jan. 2018
Start here:
UCL = 'A':'Z'; % Vector Of Uppercase Letters
then choose one!
  3 Kommentare
Stephen23
Stephen23 am 28 Jan. 2018
@John D'Errico: Not only is this very convenient, it also removes the possibility of missing a letter when building lists for comparison. Very handy!
Star Strider
Star Strider am 28 Jan. 2018
I gave an appropriate hint, while not giving a complete solution to what is obviously a homework problem, and for which the OP had shown no effort.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by