L02a_MatlabVsC - CS1372: HELPING TO PUT THE COMPUTING IN...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS1372: HELPING TO PUT THE COMPUTING IN ECE CS1372: HELPING TO PUT THE COMPUTING IN ECE CS1372 Matlab vs. C CS1372: HELPING TO PUT THE COMPUTING IN ECE C History C was written at Bell Labs initially between 1969 and 1973 as a low level systems programming language which could be used instead of assembly language to write operating systems. CS1372: HELPING TO PUT THE COMPUTING IN ECE MATLAB History MATLAB was developed in the late 1970s at the University of New Mexico. It was designed to give students access to LINPACK and EISPACK without their having to learn Fortran. It was rewritten in C and MathWorks was founded in 1984. In 2000, MATLAB was rewritten to use a newer set of libraries for matrix manipulation, LAPACK. CS1372: HELPING TO PUT THE COMPUTING IN ECE Translation Interpreted Languages MATLAB BASIC SCHEME LISP PYTHON PERL JAVA Compiled Languages C C++ ALGOL FORTRAN COBOL ADA JAVA CS1372: HELPING TO PUT THE COMPUTING IN ECE Powerful Vector, Array and Matrix Operations Matlab has a complete set of operators to allow easy creation, manipulation and operation of complex mathematical structures. C has CS1372: HELPING TO PUT THE COMPUTING IN ECE Variables Variables in Matlab are actually pointers that can point to anything so A = 7 may be followed by A = [1,2;4,5] with no problem C is a strongly typed language. A variable in C must be declared to be of a certain type and that is all that it can ever be! int A; A = 7; Although C CS1372: HELPING TO PUT THE COMPUTING IN ECE All variables must be declared in C C is strongly typed. It demands that you declare a variables type before using it Variables must be declared at the top! { int a; int b = 34; int c; c = 67; int d; CS1372: HELPING TO PUT THE COMPUTING IN ECE All variables must be declared in C C is strongly typed. It demands that you declare a variables type before using it Variables must be declared at the top! { int a; int b = 34; // This is okay! int c; c = 67; // ERROR int d; CS1372: HELPING TO PUT THE COMPUTING IN ECE C does have multidimensional arrays Just none of the cool built in operators int a[3][4] = { {1,2,3,4}, {5,6,7,8}, {9,10,11,12 }}; You want to manipulate the arraywrite some code! CS1372: HELPING TO PUT THE COMPUTING IN ECE Booleans Matlab can have variables that have values of true and false There are no booleans in C!!! When a boolean is required use an int 0 is FALSE Anything else is TRUE!!!!! CS1372: HELPING TO PUT THE COMPUTING IN ECE Semicolons In Matlab the semicolon serves to suppress the output from the line it terminates thus it may be considered optional In C the semicolon is a critical element...
View Full Document

This note was uploaded on 02/07/2012 for the course CS 1372 taught by Professor Smith during the Spring '07 term at Georgia Institute of Technology.

Page1 / 61

L02a_MatlabVsC - CS1372: HELPING TO PUT THE COMPUTING IN...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online