100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
APM1513 Assignment 3 solutions 2021 semester 1 R250,00   Add to cart

Other

APM1513 Assignment 3 solutions 2021 semester 1

2 reviews
 141 views  2 purchases

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

Preview 2 out of 7  pages

  • June 3, 2021
  • 7
  • 2021/2022
  • Other
  • Unknown
All documents for this subject (9)

2  reviews

review-writer-avatar

By: misokuhlebd • 3 year ago

review-writer-avatar

By: frononselen • 3 year ago

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

avatar-seller
cilliersfrederick
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;

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller cilliersfrederick. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R250,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

84866 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R250,00  2x  sold
  • (2)
  Buy now