Another 2 solutions
the 1st solutions- input all elements in program, dimension 3×3
ClrText
Input A
Input B
Input C
Input D
Input E
Input F
Input G
Input H
Input I
sqrt({A,B,C})->list1
sqrt({D,E,F})->list2
sqrt({G,H,I})->list3
listToMat(list1,list2,list3)->A
Print "SQRT OF ELEMENTS IS"
Print trn(A)
notice: sqrt is calculated for positive roots only
trn means transposition of matrix A
the templates are not working in program, so the matrix is displayed in 1 row - [[A,B,C],[D,E,F],[G,H,I] ]
if you want TO display the matrix as the template you need to switch from program to main application
or you can use parameter variable box and in this case you don't need the Input commands. Just enter into box all variables A,B,C,D,E,F,G,H,I and before running the program fill numbers 4,9,16,25,36,9,36,49,64 into the box parameter
ClrText
sqrt({A,B,C})->list1
sqrt({D,E,F})->list2
sqrt({G,H,I})->list3
listToMat(list1,list2,list3)->A
Print "SQRT OF ELEMENTS IS"
Print trn(A)
----------------------------------------------
the 2nd solution - all elements are entered into matrix A in main application
ClrText
colDim(A)->n
n-2->o
n-1->p
trn(A)->A
matToList(A,o)->listo
matToList(A,p)->listp
matToList(A,n)->listn
listToMat(sqrt(listo),sqrt(listp),sqrt(listn))->B
Print "SQRT OF ELEMENTS IS"
Print B
Edited by pan.gejt, 22 November 2016 - 06:32 AM.