# soft computing ppt

Document Sample

```					                          MATLAB

Submitted to- Miss Sushma khatri
Submitted by-Nitin singh solanki
Introduction
MATLAB is a high-performance language for technical computing. It integrates computation,
visualization, and programming in an easy-to-use environment where problems and solutions are
expressed in familiar mathematical notation.
MATLAB is an interactive system whose basic data element is an array that does not require
dimensioning. This allows you to solve many technical computing problems, especially those with
matrix and vector formulations, in a fraction of the time it would take to write a program in a scalar
non interactive language such as C or Fortran.
The name MATLAB stands for matrix laboratory. MATLAB was originally written to provide easy access
to matrix software developed by the LINPACK and EISPACK projects, which together represent the
state-of-the-art in software for matrix computation.
MATLAB has evolved over a period of years with input from many users. In university environments, it
is the standard instructional tool for introductory and advanced courses in mathematics, engineering,
and science. In industry, MATLAB is the tool of choice for high-productivity research, development,
and analysis.
MATLAB Vs Other OOP
Public Properties
Unlike fields in C++ or the Java language, you can use MATLAB properties to define a public interface
separate from the implementation of data storage. You can provide public access to properties
because you can define set and get access methods that execute automatically when assigning or
querying property values. For example, the following statement:
myobj.Material = 'plastic';

No Implicit Parameters
In some languages, one object parameter to a method is always implicit. In MATLAB, objects are
explicit parameters to the methods that act on them.
Calling Superclass Method
● In C++, you call a superclass method using the scoping operator: superclass::method
● In Java code, you use: superclass.method
The equivalent MATLAB operation is method@superclass.

Other Differences
In MATLAB classes, there is no equivalent to C++ templates or Java generics. However, MATLAB is
weakly typed and it is possible to write functions and classes that work with different types of data.
MATLAB classes do not support overloading functions using different signatures for the same function
name.
MATLAB Vs Other OOP cont.

Modifying Objects
MATLAB classes can define public properties, which you can modify by explicitly assigning values to
those properties on a given instance of the class. However, only classes derived from the handle class
exhibit reference behavior. Modifying a property value on an instance of a value classes (classes not
derived from handle), changes the value only within the context in which the modification is made.

Passing Objects to Functions
MATLAB passes all variables by value. When you pass an object to a function, MATLAB copies the
value from the caller into the parameter variable in the called function.
Different windows of MATLAB
Editor window-
Different windows of MATLAB
command window and command history-
Different windows of MATLAB
workspace-
Different windows of MATLAB
help window-
Desktop arrangement.
Study of basic loops

For loop-
>> for j=1:4,
j
end
j =1
j =2
j=3
j=4
while loop-

a = 1;
n = 1;
while a < 100
a = a*n
n = n + 1;
end
SOLUTION
a   =1
a   =2
a   =6
a   =24
a   =120

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 73 posted: 10/31/2012 language: English pages: 10
Description: This file contains deep description of MATLAB....
How are you planning on using Docstoc?