Homework  2

 

Download the problems here

 

Due date: June, 24 before 10:00 AM

 

The data sets and codes:

 

For problem 1:

 

MATRIX.TRAIN

MATRIX.TEST

TOKENS.LIST

readMatrix.m

nb_train.m

nb_test.m

 

For problem 2:

 

wr.txt

band1.irs

band2.irs

band3.irs

band4.irs

rsTraining.txt

 

The description of the files.

 

The files required for problem 1 have been discussed in the class.

 

wr.txt is a text file. It contains data for regression problem, the first column is the x and the other one the y.

 

band1.irs, band2.irs, band3.irs and band4.irs are binary files containing a satellite image of Kolkata captured in 4 different

frequencies. All these files have 512 * 512 bytes and one byte represents 1 pixel. The data in this file can be transferred to a matrix of

integers using the following matlab commands:

 

fp = fopen('band1.irs','r');

a=fread(fp,[512,512],’int8’);

fclose(fp)

 

You can use the following commands to display the images:

 

imagesc(a); colormap gray;