Chat with us, powered by LiveChat Justin's Guide to MATLAB in MATH 240 – Part 1 | Writedemy

Justin’s Guide to MATLAB in MATH 240 – Part 1

Justin’s Guide to MATLAB in MATH 240 – Part 1

Justin’s Guide to MATLAB in MATH 240 – Part 1
This “Justin’s Guide” is an edited version of a guide by Justin Wyss-Gallifent. It is instructional guide
before the actual Project 1, with information you will need to have. You do not need to turn in anything
for this part. Project 1 starts a few pages down.
1. Method
The way this guide is written is that it is assumed that you will sit down at a MATLAB terminal
and start. The commands that you give to MATLAB are given but the output is not. The output is,
however, talked about, with the understanding that you will put in the commands and see the output.
Then you can read about it and keep going.
2. Starting MATLAB
Find a system on campus and run MATLAB. The important window (there will probably be a couple)
will have a bunch of subwindows in it but the major panel on the right has a >> in it. This is the
prompt, it’s where we tell MATLAB what we want it to do.
3. Simple Calculation
For example, to do 4+5 we just type it in and hit “return”
>> 4+5
4. Solving a System
Now let’s do something having to do with MATH 240.
First we’ll solve a system of linear equations. We do this using MATLAB’s solve command. Due
to the quirkiness with which this command operates we have to make sure we interpret the result
correctly. For example, suppose we wish to solve the system
3×1 + x2 – 5×3 = 0
x1 – 5×2 + x3 = 2
x1 + x2 – 5×3 = -1
what we type in is the following.
>> [x1 x2 x3]=solve(’3*x1+x2-5*x3=0’,’x1-5*x2+x3=2’,’x1+x2-5*x3=-1’)
Note the apostrophes (single quotes), necessary because an equation must be treated as a string of
characters and strings of characters in MATLAB are delimited by apostrophes.
Note here that we got three solutions. What would happen if we fed MATLAB a system with not
enough equations? Let’s try!
>> [x1 x2 x3]=solve(’3*x1+x2-5*x3=0’,’x1-5*x2+x3=2’)
If you try this, MATLAB chokes. The reason is that it doesn’t know what to do or how to give the
solution. There are ways for MATLAB to solve this but they demand that we know more than we do,
too. For now we’ll need to deal with the corresponding augmented m

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order