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

Summary CODES YOU NEED TO UNDERSTAND (APM1513)

Rating
-
Sold
-
Pages
3
Uploaded on
13-02-2023
Written in
2022/2023

This document includes all the codes you need to know by heart for APM1513. I explained what each line does, that way you can understand what you code. This is very important because it makes it easier to memorize it.









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

Document information

Uploaded on
February 13, 2023
Number of pages
3
Written in
2022/2023
Type
Summary

Content preview

APM1513- CODES WORTH MEMORIZING


THE JACOBI CODE: please see study guide for complete discussion
Function xnew=Jacobi(A,b,xold)
n=size(A1); extract size of the matrix A from input
At=A;
Xnew=xold; x1 is entered into its place when determining x2.
For k=1:n Work through all the equations
At(k,k)=0 when calc. x1, we made x2 and x3=0
Xnew(k)=(b(k)-At(k,:)*xold)/A(k,k)
b(k)-> vector of right-hand side
At(k,:)-> extract row
A(k,k)-> coefficient of the X we are looking at
End
Endfunction

GAUSS-SEIDEL CODE: please see study guide for complete discussion.
Function xnew=Jacobi(A,b,xold)
n=size(A1);
At=A;
Xnew=xold;
For k=1:n
At(k,k)=0
Xnew(k)=(b(k)-At(k,:)*xnew)/A(k,k) xnew is the only difference.
End
Endfunction




ITERATIVE LINEAR SOLVING METHOD: Please see study guide for complete discussion
R171,00
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
caterinavstaden

Get to know the seller

Seller avatar
caterinavstaden University of South Africa (Unisa)
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
3 year
Number of followers
0
Documents
1
Last sold
-

0,0

0 reviews

5
0
4
0
3
0
2
0
1
0

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