MATLAB ALTERNATIVES, L. Foster, 8-17-2012

vetinnocentΛογισμικό & κατασκευή λογ/κού

7 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

80 εμφανίσεις

MATLAB ALTERNATIVES
, L. Foster, 8
-
17
-
2012

OCTAVE:

Octave is a Matlab clone. It does not have as nice an interface as Matlab and is missing some more advanced Matlab functions.

I
recommend that you
get a copy of Matlab; it is

nicer than Octave. However
,

for much of the course Octave may work
; much
Matlab code will work in Octave without changes
. If you decide to try to use Octave and do not get a copy of Matlab for your
computer, I strongly recommend that you sign up for Math 110L or pay $25 to the dep
artment office so that you have access to
Matlab in MH221. I expect on some assignments Octave will not be sufficient.

INSTRUCTIONS FOR INSTALLING OCTAVE ON A WINDOWS COMPUTER
:

1. Go to

http://sourceforge.net/projects/octave/files/Octave%20Windows%20binaries/Octave%203.6.1%20for%20Windows%20MinGW%20installer/

and click on

Octave3.6.1_gcc4.6.2_20120303.7z

to download the zipped Octav
e file.

2. Uncompress the file with a tool for unzipping files. I used 7zip which is available at
http://www.7
-
zip.org/download.html

[to
unzip Octave3.6.1_gcc4.6.2_20120303.7z, I opened the 7
-
Zip File Manager from my Windows program list, used the up a folder
arrow and folder bar to navigate to the location of Octave3.6.1_gcc4.6.2_20120303.7z, selected this file and clicked on extr
act
]
. I
expect that other unzipping packages will also work, but since I have not tried them I cannot guarantee that they will work.

3. In Windows explorer (or my computer)

move to the folder where your uncompressed octave files are located and then move
do
wn to the bin subfolder. For example I stored the octave zip file in c:
\
octave. When it was unzipped the octave files are stored
in c:
\
octave
\
Octave3.6.1_gcc4.6.2. Therefore in Windows explorer I move to c:
\
octave
\
Octave3.6.1_gcc4.6.2
\
bin.

4. Right cli
ck on octave.exe in that subfolder and then click on create shortcut.

5. Drag the file

octave.exe


Shortcut


to your desktop.

6. Click on the

octave.exe


Shortcut
” icon

on your desktop to start O
ctave.

7. It should take perhaps 20
-
30 seconds to load.

After some information
is written on the screen
a prompt “octave:1>” should
appear.

8. You might try one of the built in demos. For example at the octave:1> prompt type “demo(‘speed’)”

without the double quotes
.
Some graphs and discussion should appear
. I did

not try to interpret the graphs

or discussion
when I ran the demo
.

9. Most or many Matlab commands should now work.

FOR INSTALLATION INSTUCTIONS ON OTHER PLATFORMS:

Go to
http://www.
gnu.org/software/octave/download.html

and follow the links. I don’t have additional details since I have not
tried to install Octave on a Mac or on Linux.

PYTHON:

Another alternative to Matlab is Python. See

https://sites.google.com/site/pythonforscientists/python
-
vs
-
matlab
. Many of the
assignments in the class could be done in Python but a student would need to recode the example Matlab code that I make
available. Also f
or beginners Matlab is easier to learn than Python. For these reasons Python is not a good alternative to Matlab
for this class, unless you already know Python.

TRADITIONAL

LANGUAGES:

For application related to linear algebra, as a rough rule of thumb, it

takes about ten times as long to develo
p an application in a
traditional

language such as C, C++, Fortran, Java, Pascal, etc. as it does to develop the application in Matlab. On the other hand,
unless a Matlab application relies predominately on built
-
in

Matlab
function
s
, Matlab code will run slower than code programmed
in a compiled language such as C
, C++
,
Fortran
, etc
. We will discuss this issue in class

and explain how one can call C, C++, or
Fortran
code from Matlab.

OTHER MATHEMATICAL PROGRAMMING E
NVIRONMENTS:

Maple, Mathematica, Maxima, Wolfram Alpha

and . . .

are examples of mathematical programming environments. Matlab is
designed to work with linear algebra and is the best tool for 143M. Also Matlab is more widely used in industry

than these

other
packages.