So, you have a function that computes three matrices. You can have it return 3 output arguments. You just need to modify the function definition to look like this:
function [mat1, mat2, mat3] = functionName()
Call the function:
[mat1, mat2, mat3] = functionName()
In your workspace, the variables mat1, mat2, mat3 will now have the 3 matrices.