0
0
MATLABdata~5 mins

Help system and documentation in MATLAB

Choose your learning style9 modes available
Introduction

The help system in MATLAB shows you how to use commands and functions. Documentation explains what each part does so you can learn and fix problems.

You want to know what a MATLAB function does before using it.
You need examples to understand how to write a command.
You want to find out what inputs a function needs.
You want to check what outputs a function gives.
You want to learn about MATLAB features without searching online.
Syntax
MATLAB
help function_name

doc function_name

help shows a short explanation in the command window.

doc opens a detailed help page with examples in the MATLAB Help browser.

Examples
Shows a short description of the plot function in the command window.
MATLAB
help plot
Opens the full documentation page for plot with examples and details.
MATLAB
doc plot
Displays how to use the mean function to find averages.
MATLAB
help mean
Sample Program

This program shows how to get quick help on the sum function using help. The doc command opens a detailed help window but does not print output here.

MATLAB
% Use help to learn about the sum function
help sum

% Use doc to open detailed documentation for sum
% (This opens a window, so no output here)
OutputSuccess
Important Notes

You can type help or doc followed by any function name to get help.

Use help for quick info and doc for detailed explanations and examples.

Documentation helps you learn MATLAB faster and avoid mistakes.

Summary

The help command shows short explanations in the command window.

The doc command opens detailed documentation with examples.

Use these tools whenever you want to understand or learn MATLAB functions.