MATLAB Tutorials

Matlab tutorials:

Exercise 1.1: Entering commands

You are supposed to perform the following exercises in the specified order. Before entering each of the commands, think about the output on the screen and the result of each exercise.
a)
>> a = 1+2+3+4+5+6
b)
>> b = 1+2+3+4+5+6;
c)
>> b+3
d)
>> 1+2+3+4+5+6
e)
>> c = 10*ans

Exercise 1.2: Interruption of calculations or output

Enter the array 0:900000 and make sure the output appears in the MATLAB Command Window. Perform the exercise again and and use the key combination `ctrl-c' quickly. What is the effect? 

Exercise 1.3: Incomplete commands

By entering $ a =
 [2,3,4]$ the array $ 
(2,3,4)$ is specified to the variable $ a$ .
a)
Enter >> a = [2,3,4 and use the `return' key. Finish the exercise.
b)
Enter >> a = [2,3,4 and use the `return' key. Interrupt the input of the exercise. 
 
 

Exercise 1.4: Removal of variables

Define the variables $ u =
 [2\ 3\ 4]$ and $ v =[1\ 
5]$ and then delete them. Check if the variables are actually deleted.  
 

Exercise 1.5: Saving data files

Perform the following two exercises:
>> f = 2
and
>> g = 3 + f
Save the variables $ f$ and $ g$ in the file `try.mat'. Close MATLAB and start it again. Load the file `try.mat' and see if the variables $ f$ and $ g$ are known. Where is the file `try.mat' placed? Delete the file `try.mat'. 
 
 
Have you tried all these exercise yet, if not try now. I think you have got some answers with you do not you? Ok, now this time to check the answer. Did you get the following answer? Please compare and comment if it is not same: 
 

Answer 1.1

a)
>> a = 21 The result of the sum $ 
1+2+3+4+5+6$ is ascribed to the variable $ a$ . De output $ a = 21$ appears in the MATLAB Command Window.
b)
>> () The result of the sum $ 
1+2+3+4+5+6$ is ascribed to the variable $ b$ . The output is not visible in the MATLAB Command Window because the semicolon sign (;) is used. However, it is possible to call up the variable $ b$ .
c)
>> ans = 24 The output of the sum $ b+3$ appears in the Matlab Command Window as $ ans=24$ . No variable is ascribed to this calculation. In such a case the result is automatically ascribed to the variable $ ans$ .
d)
>> ans = 21 Also in this exercise no variable is ascribed to the calculation. The output is thus as follows: $ ans = 
21$ .
e)
>> c = 210 The result of this exercise depends on the previous answer because the variable $ ans$ is used in this calculation. Assume that $ ans = 
21$ (obtained from exercise d), then the answer on this question becomes: $ c = 
210$ .

Answer 1.2

By using the key combination `ctrl-c' you can interrupt a calculation or output in MATLAB. The effect of the key combination `ctrl-c' in this exercise is that the output is early canceled, considering the fact that you apply the key combination in time. OUTPUT SUMMARY: >> 0:90000 key combination: ctrl-c 

Answer 1.3

a)
>> a = [2 3 4 The exercise $ a =
 [2,3,4$ can be finished, after entering the `return' key, by closing the array yet with a bracket ] and again enter the `Return' key. The array [2 3 4] is now ascribed to the variable $ a$ .
b)
>> ctrl-c () The exercise $ a =
 [2,3,4$ can be interrupted by using the command `ctrl-c'. The calculation is then stopped and nothing is ascribed to the variable $ a$
 

Answer 1.4

>> u = 2:4; v = [1 5];
>> who
>> clear u v
>> who

 

 Answer 1.5

Existing variables can be saved in a mat-file by using the command >> save filename.mat. The file is written to the current active directory (see: `Current directory' in the MATLAB taskbar). Later on it is possible to call up the variables by loading the mat-file (pay attention that you are working in the directory in which MATLAB has written the mat-file) by using the command >> load filename. Entering the command >> who gives a list with used variables. Entering the command >> what gives a list with existing mat-files in that current directory. The mat-file can be deleted by entering the command >> delete filename.mat. INPUT SUMMARY:
>> f = 2
>> g = 3 + f
>> save try.mat f g
% Exit Matlab and start it again
>> who
>> what
>> delete try.mat
 
 

$0 to $1 Million - How Did He Do It?

Hello Newbie,

If you sell a product or service, this is for you. If you don't, please feel free to let other people who you know that do sell products or services online. It could make the difference between their doing ok and their doing excellent.

They will owe you one for having shared this cutting edge secret with them.

If you are still with me, I will assume that you sell a product or service online.

Let me ask you this:

"If your website was featured on 1,000's of review sites around the internet and each review site owner was marketing their website using pay-per-click, articles, forums, and coregistration, how much would that affect your profits?"

10%, 100%, 500%, 1000? Well, some merchants are making millions of dollars as a result of just a handful of affiliates using endorsements or positive reviews of their website.

As a special bonus, you make money when everyone who you refer signs up to get hosting AND when they get upgraded training materials and support. Of course if people want a completely free site, we have that too, so you can truly offer your email list a FREE Cash Pulling Website announcement.

Learn more and get started when you continue below:

Feature Your Company On Thousands Of Review Websites

Everything is completely free for you and you can have your review site template built and your site members or affiliates using it as quickly as you can let them know about it.

It's as simple as 1-2-3:

1) You customize a review site with your affiliate link for your product or service that every affiliate will use to make money.

2) You let your affiliates, customers, site visitors know about how they can make money with their own review site (featuring your products).

3) You make money for each person who upgrades their account or gets advanced training materials.

Get started below.

Feature Your Company On Thousands Of Review Websites

To your success!

Awan Chaulagain

Free Completely free but you make money right away click below

How To Explode Your Affiliate Earnings

SUMMARY:

Any Cash needed? NO

Any Risk: NO

Appropriate for: Newbies, Intermediate, And Advanced

=========================================

Dear Affiliate Marketer ,

As an affiliate marketer, you are looking for the best way you can create massive ongoing income for you that takes as little time as possible.

Ideally, you can invest a couple of minutes and get paid on it for years.

Learn more by continuing here:

Make Money Giving Away Free Money Making Websites

All you need to do is log in to your account, and let people know about how they can get their own Cash-Pulling Websites. They are valued at $2,079, but they can get them for nothing for a very limited time.

You make cash when:

1) A person gets a website and upgrades to have their own domain 2) A person upgrades their training materials 3) A webmaster refers their affiliates/customers/visitors to get their own co-branded review sites. You make a 2nd tier commission based on the lifetime commissions of the webmaster you referred.

Sign up right now and get started making some cash!

Make Money Giving Away Free Money Making Websites

To your success!

Awan Chaulagain

One clicks can give you more than $

To find your love, friend, life partner.... log on to....

Google