File Exchange

image thumbnail

Simscape Multibody Mini Golf Library

version (8.46 MB) by Steve Miller
Components for modeling a mini golf course. Contact forces are demonstrated on a 9-hole course.


Updated 17 Apr 2021

From GitHub

View Version History

View license on GitHub

This library contains components for modeling a mini golf course. It includes fixed walls, moving walls, posts, spinning obstacles, putting head, and the hole. A nine-hole course is provided, showing how you can easily build up a set of components and reuse them in different designs. A control system helps you guide the putter to the right position and shoots the ball towards the hole. This example uses the Simscape Multibody Contact Forces Library.

Please read the file to get started.

Use the "Download from GitHub" button above to get files compatible with the latest release of MATLAB.
Use the links below to get files compatible with earlier releases of MATLAB.

For R2020b:
For R2020a:
For R2019b:
For R2019a:
For R2018b:
For R2018a:
For R2017b:
For R2017a:
For R2016b:
For R2016a:

See how to defining bodies in Simscape Multibody by watching this video (5 min):

Learn more about multibody simulation with Simscape Multibody by watching this webinar

Find other Simscape examples by searching posts for the keyword "physical modeling"

Learn more about MathWorks Simscape Products:

You may reuse this content, with or without modification, in your work.
Please follow the conditions of the license file and use the following citation:
[1] Miller, Steve (2018), Simscape Multibody Mini Golf Library ( MATLAB Central File Exchange. Retrieved on <date you downloaded submission>

Cite As

Steve Miller (2021). Simscape Multibody Mini Golf Library (, GitHub. Retrieved .

Comments and Ratings (9)

Steve Miller

Hi Zhen - I can email you a version that runs in R2014a if you send me your email address.


why the files couldn't be used in R2014a?


Steve Miller

Thanks Matthew! I've submitted an update with the README.txt and fixes the "Run All" issue. It will be live later today. --Steve


Looks like an awesome add-on library.
1) No readme.txt file is included (one is included with separate Contact Force Library submission)
2) Certain functions are not available for loading (e.g., under play all).

3 star rating will be reviewed.

Wang Ya


Steve Miller

Aditya -- no low pass filter is required, so no I'm not using one. Some form of delay would be required if the formulation I used created an algebraic loop in Simulink, but the way I modeled it no loop is created.


Hi Steve,
Great model.
In the contact force model it does not seem like you are using the low pass filter? Is that the case.


MATLAB Release Compatibility
Created with R2021a
Compatible with R2015a to R2021a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!