Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
numer-60-2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rungrurdee wandee
numer-60-2
Commits
c8372b5c
Commit
c8372b5c
authored
Feb 21, 2018
by
rungrurdee wandee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
0b901981
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
30 deletions
+2
-30
back.cpython-36.pyc
week05/__pycache__/back.cpython-36.pyc
+0
-0
homew.cpython-36.pyc
week05/__pycache__/homew.cpython-36.pyc
+0
-0
back.py
week05/back.py
+0
-11
ge.py
week05/ge.py
+0
-19
readme.md
week05/readme.md
+2
-0
No files found.
week05/__pycache__/back.cpython-36.pyc
deleted
100644 → 0
View file @
0b901981
File deleted
week05/__pycache__/homew.cpython-36.pyc
deleted
100644 → 0
View file @
0b901981
File deleted
week05/back.py
deleted
100644 → 0
View file @
0b901981
import
numpy
as
np
def
upperTriSol
(
A
,
b
):
n
=
np
.
size
(
b
)
x
=
np
.
zeros_like
(
b
)
x
[
-
1
]
=
1.
/
A
[
-
1
,
-
1
]
*
b
[
-
1
]
for
i
in
xrange
(
n
-
2
,
-
1
,
-
1
):
x
[
i
]
=
1.
/
A
[
i
,
i
]
*
(
b
[
i
]
-
np
.
sum
(
A
[
i
,
i
+
1
:]
*
x
[
i
+
1
:]))
return
x
week05/ge.py
deleted
100644 → 0
View file @
0b901981
def
ge
(
A
,
b
):
pass
def
solve
(
A
,
b
):
import
numpy.linalg
result
=
numpy
.
linalg
.
solve
(
A
,
b
)
for
i
,
x
in
zip
(
1
,
range
(
len
(
result
)
+
1
),
result
):
print
(
'$x_{} = {}'
.
format
(
i
,
x
))
m
,
n
,
_
=
map
(
int
,
input
()
.
split
(
'x'
))
print
(
m
,
n
)
A
=
[]
for
row
in
range
(
m
):
A
.
append
(
list
(
map
(
int
,
input
()
.
split
(
','
))))
#solve(A,b)
print
(
n
,
_
)
b
=
list
(
map
(
int
,
input
()
.
split
(
','
)))
solve
(
A
,
b
)
week05/readme.md
0 → 100644
View file @
c8372b5c
เขียนฟังก์ชันเพื่อหา upper-triangular matrix (U) จากสมการ Ax = b
โดยเขียนฟังก์ชัน Ux = c เป็นสมการที่ลดรูปแล้ว
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment