If you are interested in the action of matrix phi-functions to a vector,
then you can also consider to compute the exponential of an extended matrix as shown in Theorem 1 in the paper [Expokit: A Software Package for Computing, Sidje R., ACM Trans. Math. Softw., 24(1):130-156, 1998] and others.
The following Matlab code computes $\varphi_p(tA)c\in\mathbb{C}^n$, i.e., the $p$-th phi-function of $tA\in\mathbb{C}^{n\times n}$ applied to a $c\in\mathbb{C}^n$, where $t\in\mathbb{R}$ is a possible time step, by evaluating the matrix exponential of an extended matrix $X\in\mathbb{C}^{n+p\times n+p}$:
X = A;
X(1:n,n+1) = c;
X(n+1:n+p-1,n+2:n+p)=eye(p-1);
X(n+p,n+p)=0;
expX=expm(dt*X);
phipAc=expX(1:n,end)*dt^(-p); % = phi_p(t*A)*c
For $p=1$, a small choice of $n$, and a diagonalizable matrix $A$ with nonzero eigenvalues you can compute a reference solution using the eigenvalue decomposition of $A$ as following
[Q,lam] = eig(A,'vector');
philam = expm1(dt*lam)./(dt*lam);
phipAc_ref = Q*diag(philam)*inv(Q)*c;
(here the auxiliary $\texttt{expm1}$ computes the exponential minus 1 of the given vector and does improve the accuracy when eigenvalues of $A$ are close to zero.)
For further works on the computation of matrix phi-functions for applications in exponential integrators you can also have a look at [Computing the Action of the Matrix Exponential, with an Application to Exponential Integrators, Higham and Al-Mohy, 2011.] or [Algorithm 919: A Krylov Subspace Algorithm for evaluating the $\phi$-Functions Appearing in Exponential Integrators, Niesen and Wright, 2012.]