View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Spring() To plot and animate a 2D-Spring

4.2 | 5 ratings Rate this file 24 Downloads (last 30 days) File Size: 1.99 KB File ID: #25055 Version: 1.0
image thumbnail

Spring() To plot and animate a 2D-Spring



easy to use and useful for mass-spring animations, elastic materials animations, etc.

| Watch this File

File Information

  You have to give it the coordinates of the ends, number of coils, natural length and radius and it gives to you the (xs,ys) coordinates of the spring points, ready to use it with plot().
  The picture shows an instant image of an animation of two coupled-pendulums oscillating
  Type <help spring> for usage.
  Don't forget to leave your comments. I'll appreciate it! :-)


This file inspired Two Or Three Masses Connected By Springs, 2 D Spring Coordinates For Plotting, and Spring Pendulum.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
24 Nov 2016 Nuttarut Panananda

The file is applicable. THANK YOU for such a great work.

19 Jul 2014 Salaheddin Hosseinzadeh

It would be a good practice to initialize your code, so that at least we can run it without any (input) knowledge of what's what for first time, and then get a clue!

04 Nov 2011 KSSV

KSSV (view profile)

good one working perfect....

14 Oct 2010 Roland Pasto

Simple & useful. Thank you for your contribution.

24 Feb 2010 Gustavo Morales

Hi Richard!
your welcome! Notify me if you make improvements, for example, if the spring can be bent now!!! :-)

Comment only
12 Jan 2010 Richard Crozier

Does exactly what it says, thanks for posting this!

Contact us