Introduction to MATLAB and script files
Now that you have access to MATLAB, I suggest you have it open and running as you worth through the following videos. Pause and re-watch them as often as you need to to ensure you follow what is being explained in them. You might find it helpful to type in the things I am typing in to make sure that everything is working for you.
Don't worry if this is all new to you. Everything we are covering here assumes you do not have a background in programming or are familiar with MATLAB .
Video 1: Introduction to MATLAB
Video 2: Matlab Scripts
Video 3: Matlab Scripts with Inputs
Before going any further it would be a good idea to have a go at writing a script of your own. Try to write a script that ask the using for a radius of a sphere and returns the volume of that sphere.
Once you have done that try to write a second script that asks the user for two inputs, a radius and a height, and returns the volume of the cone with that given height and radius at its base.
Hint: To carry out the square root in Matlab you would type sqrt(4) and to use the constant π you simply type pi.
Save these script files and bring them along to the lab. We will be working in groups. If you get stuck, don't worry. There will be help available in the lab session.