Monday, March 17, 2014

Environment for MATLAB

You really do not need to set up your own environment to start learning MATLAB/Octave programming language. Reason is very simple, we already have set up the Octave environment online, so that you can execute all the available examples online at the same time when you are doing your theory work. This gives you confidence in what you are reading and to check the result with different options. Feel free to modify any example and execute it online.
Try following example using Try it option available at the top right corner of the below sample code box:

x = [1 2 3 4 5 6 7 8 9 10];
y1 = [.16 .08 .04 .02 .013 .007 .004 .002 .001 .0008 ];
y2 = [.16 .07 .03 .01 .008 .003 .0008 .0003 .00007 .00002 ];

semilogy(x,y1,'-bo;y1;',x,y2,'-kx;y2;');
title('Plot title');
xlabel('X Axis');
ylabel('Y Axis');
print -deps graph.eps
 
For most of the examples given in this tutorial, you will find Try it option, so just make use of it and enjoy your learning.

Local Environment Setup

If you are still willing to set up your environment, let me tell you a secret, setting up MATLAB environment is a matter of few clicks. However, you need to download the installer from here:
MathWorks provides the licensed product, a trial version and a student version as well. You need to log into the site and wait a little for their approval.
Once you get the download link, as I said, it is a matter of few clicks:

Online Installlation of MATLAB Installing...

Understanding the MATLAB Environment:

You can launch MATLAB development IDE from the icon created on your desktop. The main working window in MATLAB is called the desktop. When you start MATLAB, the desktop appears in its default layout:

MATLAB desktop

The desktop has the following panels:
  • Current Folder - This panel allows you to access your project folders and files.
    Current Folder
  • Command Window - This is the main area where you enter commands at the command line, indicated by the command prompt (>>).
    Command Window
  • Workspace - The workspace shows all the variables you create and/or import from files.
    Workspace
  • Command History - This panels shows or rerun commands that you entered at the command line.
    Command History

Set up GNU Octave

If you are willing to use Octave on your machine ( Linux, BSD, OS X or Windows ), then kindly download latest version from Download GNU Octave. You can check given installation instruction for your machine.

No comments:

Post a Comment