User friendly edit boxes allow for the complete input of motion types and their properties, along with the characteristics of the cam and its follower. What follows are diagrams for displacement, velocity and acceleration, as well as an animated simulation of the cam profile and the follower.
I put my code here because it helped me personally understand more about cams and their governing equations. So I filled the code with comments in hopes of providing help for both mechanics students and new programmers.
Thanks for making this code available for everyone. I found the interface very intuitive and having the animation is great. I’m a novice Matlab programmer so I learned a lot by reading through your code.