Help function for comments not working

2 次查看(过去 30 天)
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

采纳的回答

KSSV
KSSV 2017-9-24
编辑:KSSV 2017-9-24
Replace all lines with begining % instead of %{ ...%}

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by