What is ''why' command

99 views (last 30 days)
Arun Badigannavar
Arun Badigannavar on 19 Nov 2012
Edited: Patrick Kamdem on 14 Sep 2017
What exactly the 'why' command gives?

Accepted Answer

Walter Roberson
Walter Roberson on 19 Nov 2012
>> help why
why Provides succinct answers to almost any question.
why, by itself, provides a random answer.
why(N) provides the N-th answer.
Please embellish or modify this function to suit your own tastes.
You can read or edit the source:
edit why
Jan on 19 Nov 2012
In fact, interesting.

Sign in to comment.

More Answers (1)

Patrick Kamdem
Patrick Kamdem on 14 Sep 2017
Edited: Patrick Kamdem on 14 Sep 2017
Try typing "why" in MATLAB (minus the quotes). Each time you get a response, try the why command again.


Find more on Holidays / Seasons in Help Center and File Exchange



Community Treasure Hunt

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

Start Hunting!