Help function for comments not working

3 views (last 30 days)
Lisa Lee
Lisa Lee on 24 Sep 2017
Edited: KSSV on 24 Sep 2017
Below is the script named ConeVol. After I saved the script and typed the statement of, help ConeVol, in the command window, I don't see the print out of the comments in %{ and %}. Can someone help me to understand why? Shouldn't help function print out all the help comments?
%{
Computes volume of a cone.
Creates variables radius and height.
Result is assigned to variable volume and displayed.
The script was written by Blaise Pascal
on the year 1660
%}
radius = 3; % Radius of circle at base of cone
height = 2; % Height from base to point at top of cone
volume = (1/3) * pi * radius * radius * height % Note: pi is built-in constant
Thank you, - Lisa

Accepted Answer

KSSV
KSSV on 24 Sep 2017
Edited: KSSV on 24 Sep 2017
Replace all lines with begining % instead of %{ ...%}

More Answers (0)

Community Treasure Hunt

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

Start Hunting!