Previous Up Next

2.41.2  Zero matrix : newMat matrix

newMat(n,p) or matrix(n,p) takes as argument two integers.
newMat(n,p) returns the zero matrix with n rows and p columns.
Input :

newMat(4,3)

Output :

[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]

Previous Up Next