Unformatted text preview:

Q530 Homework 1: “Hello, World.” Due date: 5 September, midnight The purpose of the first homework is to familiarize you with the programming environments that you will be using for the programming assignments this semester. You may already know this stuff. If not, now is the time to learn it. The assignment consists of two parts. The first part is to write a “Hello, World.” program in the following programming languages: Matlab, Perl, C, and Java. The second part is on Matlab. Here is a list of what you need to do: 1. Install and set up the program environments on the computer that you will be using this semester. • Perl A perl compiler can be downloaded from http://www.activestate.com/Products/ActivePerl/. You can use other compliers. • C/Java If you are a windows user, you can download Visual Studio through IU software repository: http://iuware.iu.edu/ If you are a Unix/Linux user, javac and gcc should already be installed by default. • Matlab There is no free version of Matlab. If your laboratory doesn’t have a computer with Matlab installed or you’d like to have one in your personal computer. You can get a student version (~$100) from IU software store at IMU. 2. Write programs to display “Hello, World.” in the four languages respectively. Here is an example in C++: #include <iostream.h> main () // this is a comment /* this is also a comment */ { cout << "Hello, world.\n"; } 3. Write a brief report to describe your efforts, what you’ve done, what problems you’ve solved during installation and coding, etc. 4. MATLAB problems: • Given the row vector x = [ 1 2 3 4 ] and column vector y = [ 10 9 8 7 ]’, write at least two different ways to compute the row vector z defined as iiiyxz −= .• Create the matrix  =001010100E using MATLAB build-in functions. • Plot sin x versus x in the interval 0 < x < 2pi. The line should contain 60 points labeled as red open circles. 5. Zip your programs and the report into a file with a name Q530_hw1_lastname, and submit it to


View Full Document

IUB COGS-Q 530 - COGS-Q 530 Homework 1 - Hello, World.

Documents in this Course
Load more
Download COGS-Q 530 Homework 1 - Hello, World.
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view COGS-Q 530 Homework 1 - Hello, World. and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view COGS-Q 530 Homework 1 - Hello, World. 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?