Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MachineLearning스터디/Octave: Difference between revisions

From ZeroWiki
imported>trailblaze
No edit summary
imported>trailblaze
No edit summary
Line 26: Line 26:
  [[File:eyem.png]]
  [[File:eyem.png]]
* identity matrix를 만들어 줌.
* identity matrix를 만들어 줌.
== 행렬 크기 ==
=== size ===
  size([1; 2; 3; 4])
  * 결과
  ans =
      4    1
  4 rows 1 column
=== length ===
  length([3 2; 2 3; 1 3])
  * 결과
  ans = 3
* 행렬의 열과 행의 길이 중에 큰 값이 나옴.


== 기타 함수 ==
== 기타 함수 ==

Revision as of 07:08, 14 February 2014

Octave

기본 산술, 논리 연산

Elementary Operation.PNG

  • ~= : not equal
  • false : 0
  • true : 1

행렬 만들기

 A = [1 2; 3 4; 5 6]
Matrix1.PNG
  • ;는 다음 행으로 넘어간다는 표시
 A = 1:0.1:2
Matrix2.PNG 
 A = ones(1, 3)
 B = zeros(2, 3)
Matrix3.PNG
 eye (2)
Eyem.png
  • identity matrix를 만들어 줌.

행렬 크기

size

 size([1; 2; 3; 4])

 * 결과

 ans = 

     4    1

 4 rows 1 column

length

 length([3 2; 2 3; 1 3])

 * 결과
 ans = 3
  • 행렬의 열과 행의 길이 중에 큰 값이 나옴.


기타 함수

 w = -6 + sqrt(10) * (randn(1, 10000))
 hist(w)
  • hist(w) : w에 대한 histogram을 보여줌.
 help
  • 도움말

MachineLearning스터디