%% HUTSCAT Scatterometer
% As the assignment answer, return the program listing (in Matlab or similar) and the figures as a pdf file.
% More elaborated technical description of the HUTSCAT scatterometer, you can consult the paper "A helicopter-borne eight-channel ranging scatterometer for remote sensing. I. System description" by Hallikainen et al. DOI: 10.1109/36.210457
%% Load the data
% HUTSCAT has eight data channels, one for every polarization channel fro two frequencies (10 GHz and 5 GHz) and one vector for timestamp for every sweep.

load('HUTSCAT_Data_Sample_Vectors');
whos

% As you can see, the data file contains 8 polarimetric channels of HUTSCAT measurement and time stamp vector. The measurement vector are given for 5  GHz and 10 GHz frequencies and HH, VH, HV, VV polarization measurements. All measurements are real numbers (real power spectrum already in frequency domein, every frequency corresponds to a certain distance).
%% Plot power spectrum
% Every data vector contains 1001 measurement sweeps, one sweep is 247 samples long.
% Let's plot power spectrum on the first measurement sweep for HH polarization for 10 GHz.

figure; % by typing figure, Matlab creates new figure and following command uses this handle. In this way figures are not goint to same frame.
plot(PV10HH(1:247),'r-');

%% Task 1 (1 p)
% Study the distribution of data values in both linear and logarithmic scale. Plot histogram of the PV10HH variable data both directly and by taking logarithm. Use command hist

help hist

%% Task 2 (1 p)
% Form an image matrix of the data vector PV10HH by using 'reshape' command by arranging the matrix so that every sweep is in separate column.
% Inspect the HUTSCAT scattering profile with 'imagesc' function in both logarithmic and linear scale.

help reshape
help imagesc
colormap('gray') %turns the colormap of the image to black and white

%%
%%
%
%
%