Help function for comments not working

5 visualizaciones (últimos 30 días)
Lisa Lee
Lisa Lee el 24 de Sept. de 2017
Editada: KSSV el 24 de Sept. de 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

Respuesta aceptada

KSSV
KSSV el 24 de Sept. de 2017
Editada: KSSV el 24 de Sept. de 2017
Replace all lines with begining % instead of %{ ...%}

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by