Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

1. For a domain defined between -5 ≤ x ≤ 5 -5

                                             - 5 ≤ y ≤ 5

                                               0 ≤ t 10

Generate a dataset with variability in space and time following:

f (x, y, t) = f1 (x, y, t) + f2 (x, y, t) + f3 (x, y, t)

where

• Standing wave oscillating in time:

f1(x,y,t) = Sin(0.2Πy) * Cos(0.5Πx) * (1 + Cos(2Πt))

• Trend (increasing magnitude in time) with random component:

f2(x, y, t) = 0.09 * t + ε where ε = N(0, 0.01)

• Spike in space at different times:

                                    -1 ≤ x ≤ 1  and

F3(x, y, t) = 0.8 if       =   -1 ≤ y ≤ 1 and

                                     t = 0.4, 1 2, 2.5, 3, 4 2,5,5.3, 6.2,6.6, 7.5,9

                                = 0                  Otherwise

This problem is aimed at helping you understand the PCA method using an idealized dataset Since you know the data you are generating it should help you understand the capability of the method.

a. Perform a principal component analysis on the dataset you have generated.

b. What is the total variability in the dataset?

c. What is the percent of the total variability explained by the first three components?

d. How many components should be retained?

e. Plot the spatial representation of each of the PCs you retained.

f. Reconstruct (back transform] your original data after reducing the dimensionality of the data. Plot the scores of each of the PCs you retained

Discuss your results.

2. Using a precipitation dataset provided to you (angle \ homework\ PIV.txt), perform a PCA analysis and interpret the results. Answer the same questions as in Problem 1 The file P_124 file contains monthly precipitation in U.S. from
• January 1979 - December 2000 (264 months).
• It extends from 140 W to 60 W (33 longitude points or rows) and
• 20 N to 60 N (17 latitude points or columns)
It covers the conterminous -United States. The file is read first by longitude, then by latitude and then by time.

When you are doing the PCA, remove the means for each month.

For example: Jani; - average(Jan(1979 - 2001)), so that the dominant mode will not capture the intra-annual cycle (not very interesting).

Q. 2

In case if it helps, I have converted the original precipitation data (PW.txt) to Locations - by - Time 2D data (PW_Loc_Time.txt) and added the file in the homework folder. You can use this new file to calculate the covariance and the PCAs. The figure below shows the spatial variation of the precipitation for month (T = 20). In general, the data consist of 264 (total number of months) similar spatial variations.

Matlab code for reshaping the file:

% Import data
load PW.txt -ASCII
% data size (known)
rows = 33; cols = 17; locat = rows*cols;
months = 264;
%Reshape my data
PWin = reshape(PW,locat,months);

[X,Y] = meshgrid((l:rows),(1:cols));

% which month do you want to plot?

mnt = 20;
Z = reshape(PWin(:,mnt),rows,cols);

surface(Z,'LineStyle', 'none');

Attachment:- Data.rar

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M91596366
  • Price:- $160

Guranteed 48 Hours Delivery, In Price:- $160

Have any Question?


Related Questions in MATLAB

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

Assignment -we have daily gridded rainfall data of 40 years

Assignment - We have daily gridded rainfall data of 40 years and structure of the dataset is like below; Lat = [6.5:0.25:38.5]; Lon = [66.5:0.25:100]; Rainfall (135x129x365x40) (Lon, Lat, days, years). Now, we looking fo ...

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

Assignmentq1 find the laplace transforms of the following

Assignment Q.1 Find the Laplace transforms of the following functions: (a) t 2 + at + b and (b) sin(2nΠt/T) Q.2 Find f (t) for the following F(s) = α[ f (t)]. (i) 5/(s + 3), (ii) 1/s 2 + 25, (iii) 1/s(s+1) Q.3 Find the L ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As