*why* easter egg in MATLAB
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Typing "why" into the command prompt yields a random answer. My question is: WHen I execute "why", how can I store the output string as a variable?
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (2)
Shashank Prasanna
am 1 Feb. 2013
or
>> edit why
change
function why(n)
to
function a = why(n)
0 Kommentare
Daniell Algar
am 1 Feb. 2013
Bearbeitet: Daniell Algar
am 1 Feb. 2013
This is quite the ugly solution but. Open a script, paste
diary('whyText.txt')
for i= 1: 10
why
end
diary off
and you'll store the answers in the current folder/whyText.txt.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Holidays / Seasons finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!