# Matlab Example Programs and Utilities

Sort by: Name | Most recent

driving_demo.m

matlabtetris.m

wordcloud_generator.m

movieread.m

imagemenu.m

socks.m

bounce.m

plotting_background_image.m

pendulum_wave_gui.m .fig file

sudoku_solver2.m

move_transparent_object.m

rotate_image.m

rockytop2.m

trajectory.m

curvature.m

center_mass_image.m

matrix_growth_times.m

vector_drawing.m

image_marker_example.m

menuplus.m

send_email.m

cell_extract.m

temperature_from_web.m

gpa2.m

dictionary_read.m

ascii_art.m

space_invaders.m

webpage_create.m

optimization_trough.m

create_animation.m

simulation_hibbler_12_19.m

base_conversion.m

driving_demo.m

Example of reading a movie (AVI) file

Displays a montage of individual frames in a figure window

and creates a file with a montage of frames and displays the file

image_edge_detect.mDisplays a montage of individual frames in a figure window

and creates a file with a montage of frames and displays the file

imagemenu.m

plotting_background_image.m

Fifteen Pendulums Swinging

Simulation with GUI showing fifteen pendulums swinging together

The lengths are such that they make neat visual patterns near 0, 30, and 60 seconds

This .m file requires the similarly named .fig file

polystring2.mSimulation with GUI showing fifteen pendulums swinging together

The lengths are such that they make neat visual patterns near 0, 30, and 60 seconds

This .m file requires the similarly named .fig file

Example of playing a song

Parses a text string of 'notes' and plays the song by generating the appropriate

frequency curves. Minimal documentation.

center_menu.mParses a text string of 'notes' and plays the song by generating the appropriate

frequency curves. Minimal documentation.

Purpose: Create a centered MATLAB menu

Method: Create a timer that moves the menu after it is displayed

because MATLAB doesn't provide a way of positioning the menu.

This is kludgy, but it seems to work.

better_menu_example.mMethod: Create a timer that moves the menu after it is displayed

because MATLAB doesn't provide a way of positioning the menu.

This is kludgy, but it seems to work.

Better menu example

A simple alternative to MATLAB's menu command - centered and optional sizing

save_as_png.mA simple alternative to MATLAB's menu command - centered and optional sizing

Solve projectile motion trajectory equation for any variable

plotcurves.mcurvature.m

Demonstrate symbolic math in MATLAB

Calculate the radius of curvature for trajectory equation

Calculate normal and tangential acceleration components

image_transparency.mCalculate the radius of curvature for trajectory equation

Calculate normal and tangential acceleration components

Image transparency example

Shows how to use and make a transparency matrix with an image

image_trans.mShows how to use and make a transparency matrix with an image

Compute the center of mass of an image

by treating each pixel as a point mass

mario2.mby treating each pixel as a point mass

vector_drawing.m

image_marker_example.m

GPA calculator example

reads and writes text data files

simpson.mreads and writes text data files

Approximate integral using composite simpson rule

http://en.wikipedia.org/wiki/Simpson's_rule

projectile2003.mhttp://en.wikipedia.org/wiki/Simpson's_rule

Projectile motion with a target and drag - example from EF 102 2003

physics_block_on_incline.m A general solution for a box on incline with force and friction

Has routines for drawing straight and curved vectors

timer_demo.mHas routines for drawing straight and curved vectors

Example of using a timer to simulate a clock ticking

image_cropper.m Interactive image cropping

Prompts user for a file name of a file that contains one or more

images that are to be rotated and cropped. The user then clicks on the

corners of the images and Matlab extracts, rotates, crops, and

saves the sub-image(s).

sound_fader.mPrompts user for a file name of a file that contains one or more

images that are to be rotated and cropped. The user then clicks on the

corners of the images and Matlab extracts, rotates, crops, and

saves the sub-image(s).

Demonstrate playing a music file with a fade in and out

digitize.mdictionary_read.m

Example of reading a ~500,000 word dictionary into Matlab

This example loads all words into a cell array and keeps a track of

the count of the lengths and displays all words over 20 characters long

coulomb.mThis example loads all words into a cell array and keeps a track of

the count of the lengths and displays all words over 20 characters long

ascii_art.m

space_invaders.m

Simple space invaders game

Example of simple real-time user interaction

Ugly code with minimal comments

file_text_table.mExample of simple real-time user interaction

Ugly code with minimal comments

webpage_create.m

Example of how to create a web page with Matlab output

Has functions for putting tables, text, titles, and images on the page

text_bottles.mHas functions for putting tables, text, titles, and images on the page

Example of working with text

Displays the complete lyrics to '99 bottles of beer...'

plot_date_scale.mDisplays the complete lyrics to '99 bottles of beer...'

optimization_trough.m

create_animation.m

simulation_hibbler_12_19.m

base_conversion.m

Convert a number from one base to another

Supports decimals, bases up to 36, only positive numbers

ef_shooter_gui.mSupports decimals, bases up to 36, only positive numbers

Engage golf ball gun analysis/simulator

A GUI for setting parameters and displaying results of a 'shooter'

truss_wrs.mA GUI for setting parameters and displaying results of a 'shooter'

A large truss analysis program with many different examples

Creates plots of geometry, results, FBDs, and equations

quakeplot.mCreates plots of geometry, results, FBDs, and equations

Example of importing data and plotting

switcher.m Example of using a switch statement with a menu

text_placement_example.m Example of centering text in a figure

kick3d.m Demo of how to show a 3D trajectory on an image

polystring.mFunction to format a polynomial coefficient list as an equation text