set verbose off matrix A = mnormal(4,4) # generate a random matrix mwrite(A, "A", 1) # and save it to a file foreign language=julia # call Julia print("Hi from Julia!\n"); # output a string A = gretl_loadmat("A"); # grab the matrix from gretl gretl_export(inv(A), "iA.mat"); # and save its inverse end foreign # go back to gretl matrix iA = mread("iA.mat", 1) # read the inverse from Julia matrix check = A * iA # compute the product print check # print out the check (should be I)