Matrix computation with matrix size change by user while running code

Hi there,
I appreciate you sharing your knowhow. :)

I am trying to make a code for below objective.

1) Copy two matrices to device memory.
 > One is {Lx(MxN)} matrix, Another is Lx{(Nx1)}.

2) Calculate L times for loop of matrix calculation.
 > matrix calculation: L times of {(MxN) x (Nx1)}

3) Display the result (LxN)

4) User can change L iteraion times.
<b> It affects to not only two matrices, but the number of iterations of for loop.</b>

Is this possible to realize by CUDA?
So far, I have seen some codes just calculating direct which means set values without user input.
Previous question, someone(kbam, thank you!) gave me a comment.
nBody sample code helps me.
I checked it. It seems that it does not change the matrix size or copy matrix to device memory.

I am a newbie of CUDA.
At this moment, I really want to study CUDA for lots of huge matrix computation algorithm or complicated calculation problem with taking long time for calculating.

Thank you in adavance.