Matlab tutorial course Exercises 1:. Exercises Go back to my webpage, download the file ‘startup.m’ and save it in your MATLAB home folder – Must be directly.

Slides:



Advertisements
Similar presentations
Lecture 14 User-defined functions Function: concept, syntax, and examples © 2007 Daniel Valentine. All rights reserved. Published by Elsevier.
Advertisements

I weigh 700 N and I am in a spaceship that is pushing up on me with a force of 1100 N. A. What is my mass? B. What is the net force acting on me? C. What.
Matlab tutorial course Exercises 4:. Exercises – for loops Download the scripts loops_example.m and if_else_example.m, run the code Download the function,
Universal Gravitation
Electrical & Gravitational Force. Newton’s Universal Law of Gravitation Every object in the universe attracts every other object with a force that for.
Weight and Gravitational Force
Matlab tutorial course Exercises 2:. Exercises Copy the script ‘face_points.m’ from my webpage into your ‘scripts’ folder Create a new folder in your.
Newton’s Universal Law of Gravitation. Answer Me!!! How does the force of gravity affect objects with similar (very large) masses?
Newton’s Law of Universal Gravitation
Newton’s Law of Gravitation. Newton concluded that gravity was a force that acts through even great distances Newton did calculations on the a r of the.
Newton's law of universal gravitation states that every point mass in the universe attracts every other point mass with a force that is directly proportional.
Newton’s Law of Gravitation. Newton concluded that gravity was a force that acts through even great distances Newton did calculations on the a r of the.
What can you tell me about gravity?. Gravity is usually assumed to be a uniform vertical downward force......it is actually radial.
1.  Legend has it that Sir Isaac Newton was struck on the head by a falling apple while napping under a tree. This prompted Newton to imagine that all.
My Documents MarysWebpage 1-WebpageFolders&Files Projects&Assignments MySpinPage SciFairProjPage The folders you should have in “My Documents” are shown.
Newton didn’t discover gravity; he discovered that gravity is universal. Everything pulls on everything else in a simple way that involves only mass and.
Chapter 1: Getting Started with MATLAB MATLAB for Scientist and Engineers Using Symbolic Toolbox.
GRAVITY What goes up, must come down??. Gravity Is it possible for some basketball players to “hang” in the air during a dunk? Give your opinion
Law of Universal Gravitation. Universal Gravitation gravity is a force of attraction between any two masses gravity is a UNIVERSAL force –universal meaning.
Gravity The force of attraction between objects that is due to their masses.
Newton’s Law of Universal Gravitation. What do we know about gravity?
Newton’s Law of Gravitation Chapter 7, Section 3 Pg
Daily Science Pg.30 Write a formula for finding eccentricity. Assign each measurement a variable letter. If two focus points are 450 km away from one another.
Universal Law of Gravitation
Gravitation Additional reading: Higher Physics for CfE, p.55 – 63. Notes p.34 Newton’s “Thought Experiment” Sir Isaac Newton, as well as giving us the.
Universal Law of Gravitation. So because of Newton’s 3 rd law every body in the universe exerts a force of attraction on every other body. This is Newton’s.
Sci. 1-4 Gravity: A force of Attraction Pages
PHY115 – Sault College – Bazlurslide 1 Gravitational Force.
GRAVITATION NEWTON’S LAW OF GRAVITATION There is an attractive force between any two bodies which is directly proportional to the product of their masses.
Chapter 7-2 Newton’s Law of Universal Gravitation St. Augustine Preparatory School January 14, 2015.
Acceleration The rate at which velocity changes. Includes: increasing speed decreasing speed changing direction (with no change in velocity)
Introduction to Literate Programming in Matlab 2WN50 – Week programming-in-matlab.pptx?dl=0.
UNIT 7 - UNIVERSAL GRAVITATION Simplified Notes. GRAVITY IS UNIVERSAL  The moon is “constantly falling around the Earth.” It has velocity that keeps.
Newton’s Law of Universal Gravitation
The Law of Universal Gravitation. The legend goes that Sir Isaac Newton developed his theory when an apple fell on his head.
Law of Universal Gravitation Law of Universal Gravitation: gravity is a force of attraction that exists between any two objects that have mass. Force of.
Newton’s Fourth Law Universal Gravitation UniversalUniversal Universal Gravitation.
Newton’s Law of Universal Gravitation
Newton’s Universal Law of Gravity Every object attracts every other object with a force that is directly proportional to the masses of the objects and.
Universal Law of Gravitation. Newton and Gravity Newton and the apple “If gravity attracts an apple toward the Earth, perhaps it also attracts the Moon,
The Solar System The Moon The Earth The Sun How do they move? Why doesn’t the Earth fly away? Photos by NASA.
FgFg agag mg g W Do you know the difference?? Newton’s Law of Universal Gravitation Every body in the universe attracts every other body with a force.
Newton’s Law of Universal Gravitation. gravityDescribes the attraction between two (or more) bodies due to force of gravity between them objectEvery object.
NEWTON’S LAW OF UNIVERSAL GRAVITATION Newton’s Law of Universal Gravitation.
Newton’s Law of Gravitation Definition of Newton’s Law of Gravitation: The gravitational force between two bodies is directly proportional to the product.
Physics/Gravity Jeopardy
Unit 2: Forces in Physics
Forces Types of forces Mass and weight Forces and motion Friction
Universal Law of Gravitations, Statics, Coulomb’s Law
Newton’s Law of Universal Gravitation
Newton’s law of Universal Gravitation
“A force of attraction”
Matlab Training Session 4: Control, Flow and Functions
2-2-2 Universal Gravitation
Daily Science Weight and mass are not the same thing.
Newton’s Laws of Motion
Dynamics Universal Gravity Law.
Writing functions in MATLAB
Matlab tutorial course
Chapter 5 Matter In Motion
Lesson 1: Newton’s Law of Universal Gravitation
Chapter 12 Section 2 Gravity and Motion.
The Law of Universal Gravitation
Chapter 5 Matter In Motion
Universal Gravitation
Using Script Files and Managing Data
Newton’s Law of Universal Gravitation
Matlab tutorial course
Universal Gravitation
Newton’s Law of Universal Gravitation
Presentation transcript:

Matlab tutorial course Exercises 1:

Exercises Go back to my webpage, download the file ‘startup.m’ and save it in your MATLAB home folder – Must be directly in ‘Documents/MATLAB’ (not in the TutorialSlides you created earlier) In your Matlab home folder, create a folder ‘code’ Inside this, create two folders: ‘scripts’ and ‘functions’ Close Matlab, then reopen it – You should see a welcome message this time (and every time you open Matlab from now on) – You can edit ‘startup.m’ to change the welcome message if you like – Type ‘path’ in the command window, your folder should have been added Copy ‘my_first_script’ and ‘my_fun’ into the suitable folders – Check both script and functions work as before

Exercises Use Matlab to work out how many seconds there are in a year – Hint, create variables, num_days, num_hours, etc first… – How many seconds are there in 2 years? Or 31 years? Can you write this as a function to compute the number of seconds for any given number of years? – Hint your function should have one input (the number of years) and one output – the answer – Remember to use expressive function and variable names!

Exercises Lookup ‘Newton's law of universal gravitation’ (yes, you can use wikipedia) Use the command prompt to compute the force of attraction between the moon and the earth – You can assume Earth’s mass: 5.97x10 24 kg Moon’s mass: 7.35x10 22 kg Distance from earth to moon: 380,000km Gravitational constant: 6.674×10 −11 N m 2 kg −2 Rewrite this as a function that takes as input, M 1, M 2 and r When you have tried both exercises, go back to my website, in the folder ‘code’ then ‘functions’ you can see my sample answers – How did you do?