100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

APM1513 Assignment 3 solutions 2021 semester 1

Rating
2,5
(2)
Sold
2
Pages
7
Uploaded on
03-06-2021
Written in
2021/2022

APM1513 Assignment 3 solutions 2021 semester 1. Code and output included.










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
June 3, 2021
Number of pages
7
Written in
2021/2022
Type
Other
Person
Unknown

Subjects

Content preview

APM1513

ASSIGNMENT 3




Question 1
give two commands

>rand("state",student_number);

>rand(1)



Run own output and paste your output here



Question 2
function x1 = powermethod(A, iter)

[m,n] = size(A);

x1=rand(n,1);

for k = 1 : iter

xcap = A*x1;

xnorm = norm(xcap,2);

x1 = xcap/norm(xcap,2);

end;

end


%A matrix

A = [2.781344 -1.921334 0.493612 1.367198 -1.014289; 0.015050 -0.205731 0.903377 1.780261 -
0.824057; -0.087144 0.606003 2.977860 -0.140473 -0.750938; 0.212440 -2.477599 0.980236
4.233562 -1.207581; -0.136646 -1.168924 0.453692 0.915245 1.712964 ];

% power method using Eigen values

x1 = powermethod(A,100);

eigVal_power_A = (A*x1)./x1;

% eigenvalues and eien vector values A*V = V*D

[V,D] = eig(A)

, Output

V =


0.4203 0.4864 -0.1081 0.3310 -0.4399
0.6126 0.2587 -0.4846 0.4498 0.2630
0.0040 0.4096 -0.0449 0.4752 0.8173
0.5710 0.3920 -0.8295 0.6533 0.1595
0.3493 0.6124 -0.2519 0.1884 0.2094



D =


1.0000 0 0 0 0
0 2.0000 0 0 0
0 0 2.5000 0 0
0 0 0 3.0000 0
0 0 0 0 3.0000



Question 3

function x1 = powermethod(A, iter)

[m,n] = size(A);

x1=rand(n,1);

for k = 1 : iter

xcap = A*x1;

xnorm = norm(xcap,2);

x1 = xcap/norm(xcap,2);

end;

end


%A matrix

A = [-1.6731385 -3.6381454 -1.8272855 -2.7022868; -1.7080530 -0.0039461 0.1019678 -1.3595453;
2.4426950 3.4321965 3.8982919 2.1372124; 5.7672696 5.4815125 1.3344020 6.2787928 ];

% power method using Eigen values

x1 = powermethod(A,100);

eigVal_power_A = (A*x1)./x1;

Reviews from verified buyers

Showing all 2 reviews
4 year ago

4 year ago

Might as well just look at Chegg. He/she just copied and pasted from there for 99% of the solutions.

2,5

2 reviews

5
0
4
0
3
1
2
1
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
cilliersfrederick University of Johannesburg
View profile
Follow You need to be logged in order to follow users or courses
Sold
626
Member since
7 year
Number of followers
384
Documents
353
Last sold
1 month ago
Mathsmadeeasy

We supply detail solutions to assignments so that you can understand the theory and the Method about it. So that you can ace the exam. All Unisa students will benefit from our solutions and become masters in the module in no time.

3,3

94 reviews

5
28
4
20
3
16
2
14
1
16

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions