- TI nspire
[TI-nspire] 행렬의 입력 & 계산 - 확장 라이브러리 Matrix Library
1. 라이브러리 설명
행렬의 입력 및 계산을 도와주는 확장 라이브러리입니다.
Matrix pieces Arithmetic function & Cofactor Expansion Program TI-Nspire
By creeras
Ver 1.5 (2024-10-21)
---
Usage
Function_name(matrix1,matrix2,row_number,column_number)
: For overwrite(), add(), subtract(), multiply(), divide()
Dim(matrix1) have to be bigger than dim(matrix2), and have to put all matrix2 elements opon matrix1 elements to calculate it.
Function_name(matrix,row_number,column_number)
: For insert(), insertrow(), insertcol(), minor(), cofactor()
Function_name(matrix,r or c,index)
: For coex()
Function_name(matrix)
: For adjoint(), rank(), lunp()
Caution
Result of Function() is not stored to original matrix. So store it to original matrix variable or new matrix variable.
2. 함수 (및 프로그램) 설명

- add(matrix1,matrix2,row_number,column_number) : 행렬을 일부분만 더함

ㄴ mat_big 행렬에 mat_small을 더함. 4행 2열 ~ 5행 3열 부분만
subtract(matrix1,matrix2,row_number,column_number) : 행렬을 일부분만 뺌
multiply(matrix1,matrix2,row_number,column_number) : 행렬을 일부분만 곱함
divide(matrix1,matrix2,row_number,column_number) : 행렬을 일부분만 나눔 - overwrite(matrix1,matrix2,row_number,column_number) : 행렬을 일부분만 덮어쓰기 ; 기존 값은 무시되고, 새로운 함수의 값이 덧쓰입니다.
- insert(matrix,row_number,column_number) : 행 또는 열을 추가합니다. (0으로 채워져 있음)

delete(matrix,row_number,column_number) : 행 또는 열을 삭제합니다(=소행렬)

- Insertrow(matrix,row_number,column_number) : 1행(만)의 이동.

ㄴ 나머지 행들간의 순서변화 없음.

ㄴ 내장함수 rowSwap( )은 2행 사이의 위치 교환
Insertcol(matrix,row_number,column_number) : 1열(만)의 이동. (나머지 열들간의 순서변화 없음.)

- minor(matrix,row_number,column_number) : "소행렬식", 부호를 고려하지 않은 소행렬의 행렬식. \( M_{ij} \)
cofactor(matrix,row_number,column_number) : 여인자, 부호를 고려한 소행렬식. \( C_{ij} = (-1)^{i+j} M_{ij} \)
adjoint() : 딸림행렬 = 수반행렬 - lunp() : permutation 없이 LU 분해하는 프로그램. // v1.4에서 추가됨. (다른 것들은 다 함수인데, 이것은 프로그램입니다)
https://allcalc.org/9593#comment_49292 - coex(matrix,r or c,index) : 여인자 전개 // v1.5 에서 수정됨.
3. 사용 방법
3-1. 라이브러리를 다운로드 : matrix.tns
3-2. TI-nspire의 MyLib 폴더에 옮겨 넣고
3-3. refresh Library : 【Doc】 【6】 상세 설명은 다음 링크 확인 https://allcalc.org/35636
사용하시면 됩니다.
4. 동영상 설명
5. 업데이트 내역
V1.31 (2015-11-22)
근사(approx)계산시 rank 오류 해결
V1.40 (2024-10-07)
lunp() 추가 // permutation 없이 LU 분해함.
V1.50 (2024-10-21)
coex() 수정 // 기존에 열선택할 수 없던 문제, 그리고 step-by-step 확인하지 못하던 문제 해결
댓글12
- 1
- 1
- 2
- 1
- 1
- 2
-
세상의모든계산기
여인자 전개 프로그램 수정 V1.5
Define LibPub coex(mat1,choice,index)= Func :© coex(matrix,r or c,index) :© Initialize :Local mat1_dim,i,j,co.result,minormat,sgn :dim(mat1)→mat1_dim :newMat(mat1_dim[1],2)→co.result : :©Main Body :Disp "Cofactor Expansion =" : :If string(choice)="r" Then : If 1≤index≤mat1_dim[1] Then : For j,1,mat1_dim[2] :[mat1[index,j],cofactor(mat1,index,j)]→co.result[j] : minormat:=delete(mat1,index,j) : sgn:=(−1)^(index+j) : If j=1 Then : If sgn=1 Then : Disp string(mat1[index,j])&"×det(",minormat,")" : Disp "(("&string(mat1[index,j])&")×("&string(minor(mat1,index,j))&"))" : Else : Disp "-("&string(mat1[index,j])&")×det(",minormat,")" : Disp "-"&"(("&string(mat1[index,j])&")×("&string(minor(mat1,index,j))&"))" : EndIf : Else : Disp "----------" : If sgn=1 Then : Disp "+("&string(mat1[index,j])&")×det(",minormat,")" : Disp "+"&"(("&string(mat1[index,j])&")×("&string(minor(mat1,index,j))&"))" : Else : Disp "-("&string(mat1[index,j])&")×det(",minormat,")" : Disp "-"&"(("&string(mat1[index,j])&")×("&string(minor(mat1,index,j))&"))" : EndIf : EndIf : EndFor : Else : Disp "Invalid Row Index" : EndIf : :ElseIf string(choice)="c" Then : If 1≤index≤mat1_dim[2] Then : For i,1,mat1_dim[1] :[mat1[i,index],cofactor(mat1,i,index)]→co.result[i] : minormat:=delete(mat1,i,index) : sgn:=(−1)^(index+i) : : If i=1 Then : If sgn=1 Then : Disp string(mat1[index,i])&"×det(",minormat,")" : Disp "(("&string(mat1[i,index])&")×("&string(minor(mat1,i,index))&"))" : Else : Disp "-("&string(mat1[index,i])&")×det(",minormat,")" : Disp "-"&"(("&string(mat1[index,i])&")×("&string(minor(mat1,index,i))&"))" : EndIf : : Else : Disp "----------" : If sgn=1 Then : Disp "+("&string(mat1[index,i])&")×det(",minormat,")" : Disp "+"&"(("&string(mat1[index,i])&")×("&string(minor(mat1,index,i))&"))" : Else : Disp "-("&string(mat1[index,i])&")×det(",minormat,")" : Disp "-"&"(("&string(mat1[index,i])&")×("&string(minor(mat1,index,i))&"))" : EndIf : : EndIf : EndFor : Else : Disp "Invalid Column Index" : EndIf :Else : Disp "Invalid Choice : Input ""r"" or ""c"" for 2nd argument" :EndIf : :© Finalize :Return det(mat1) :EndFunc사용 예시


세상의모든계산기 님의 최근 댓글
HP-39gII 에 ExistOS 설치하기 https://allcalc.org/38526 2025 11.07 1. 왜 검은색이 아닌 다른 색으로 보일까? (제공된 LUT 필터) 제가 제공해 드린 magenta_lens.cube LUT 필터는 540~560nm(녹색-노란색) 파장대의 색상을 '완전히 제거(검은색으로 만듦)'하는 대신, '다른 색상으로 왜곡/변환'하도록 설계되었습니다. * 원리: LUT(Look-Up Table)는 특정 입력 색상(Input RGB)을 미리 정해진 다른 출력 색상(Output RGB)으로 매핑하는 테이블입니다. 이 LUT는 540~560nm에 해당하는 RGB 값들이 들어오면, 검은색(0, 0, 0)이 아닌, 매우 어둡거나 채도가 낮은 특정 색(예: 어두운 올리브색, 갈색 등)으로 변환하라고 지시합니다. * 의도: * 현실적인 물리 필터 시뮬레이션: 실제 고가의 색약 보정 안경도 특정 파장을 100% 완벽하게 차단하지는 못합니다. 빛의 일부를 흡수하고 일부는 통과시키거나 변환하는데, 이 LUT는 그러한 현실 세계의 필터 효과를 더 비슷하게 흉내 냈을 수 있습니다. * 시각적 정보 유지: 특정 색을 완전히 검게 만들면 그 부분의 형태나 질감 정보가 완전히 사라집니다. 하지만 다른 어두운 색으로 대체하면, 색상 정보는 왜곡되더라도 밝기나 형태 정보는 어느 정도 유지되어 전체적인 이미지가 덜 어색하게 보일 수 있습니다. 결론적으로, 스펙트럼 그림에서 해당 대역의 색이 갑자기 '다른 색으로 툭 바뀌는' 현상은, LUT 필터가 "이 파장대의 색은 앞으로 이 색으로 표시해!"라고 강제적으로 지시한 결과이며, 이것이 바로 이 필터가 작동하는 방식 그 자체입니다. 2. 왜 'Color Vision Helper' 앱은 검은색으로 보일까? 비교하신 'Color Vision Helper' 앱은 노치 필터의 원리를 더 이상적(Ideal)이고 교과서적으로 구현했을 가능성이 높습니다. * 원리: "L-콘과 M-콘의 신호가 겹치는 540~560nm 파장의 빛은 '완전히 차단'되어야 한다"는 개념에 매우 충실한 방식입니다. * 구현: 따라서 해당 파장에 해당하는 색상 정보가 들어오면, 어떠한 타협도 없이 그냥 '검은색(RGB 0, 0, 0)'으로 처리해 버립니다. 이는 "이 파장의 빛은 존재하지 않는 것으로 처리하겠다"는 가장 강력하고 직접적인 표현입니다. 2025 11.06 적용사례 4 - 파장 스펙트럼 https://news.samsungdisplay.com/26683 ㄴ (좌) 연속되는 그라데이션 ➡️ (우) 540 이하 | 구분되는 층(색) | 560 이상 - 겹치는 부분, 즉 540~560 nm 에서 색상이 차단? 변형? 된 것을 확인할 수 있음. 그럼 폰에서 Color Vision Helper 앱으로 보면? ㄴ 540~560 nm 대역이 검은 띠로 표시됨. 완전 차단됨을 의미 2025 11.05 빨간 셀로판지로도 이시하라 테스트 같은 숫자 구분에서는 유사한 효과를 낼 수 있다고 합니다. 색상이 다양하다면 빨강이나, 노랑, 주황 등도 테스트해보면 재밌겠네요. 2025 11.05 안드로이드 앱 - "Color Vision Helper" 다운받아 본문 내용을 카메라로 찍어 보니, 본문 프로그램에서는 애매하게 보이던 부분에서도 구분이 완전 확실하게 되네요. 숫자 구분 능력 & 편의성 면에서 압도적이라고 할 수 있겠습니다. 2025 11.05