Scripting Guide > Data Structures > Matrices in JSL Scripts > Inquiry Functions in Matrices
발행일 : 03/10/2025

Inquiry Functions in Matrices

The NCol() and NRow() functions return the number of columns and rows in a matrix (or data table), respectively:

NCol( [1 2 3, 4 5 6] ); // returns 3 (for 3 columns)
NRow( [1 2 3, 4 5 6] ); // returns 2 (for 2 rows)

To determine whether a value is a matrix, use the Is Matrix() function, which returns a 1 if the argument evaluates to a matrix.

A = [20, 64, 3];
B = {20, 64, 3};
Is Matrix( A ); // returns 1 for yes
Is Matrix( B ); // returns 0 for no
더 많은 정보를 원하십니까? 질문이 있습니까? JMP 사용자 커뮤니티에서 답변 받기 (community.jmp.com).