MATLAB® Programming

Hello World Example

Click below to go directly to a specific section:
Description | Source Code | Sample Run | Program Notes


This program demonstrates the text output function displaying the message "Hello world!".

Source Code

% Name:     hellowor.m
% Purpose:  Say "Hello World!" in two different ways
% Do it the good ol' fashioned way...command window
disp('Hello World!');
% Do it the new hip GUI way...with a message box
msgbox('Hello World!','Hello World!');

Sample Run

>>  hellowor
Hello World!
hellowor_gui.gif (1388 bytes)

Program Notes

This program has been tested, it works perfectly without any errors or warnings.

[Back] [Home]

Last modified:  12:54 AM on 12/10/1997