You could store the letters as follows in the variable currentResult. I've added in some conditions to count lives. One could also add other conditions like, checks to ensure you don't guess the same letter twice. The while loop runs until one of the conditions in the second if else block becomes true, i.e. after you win or you die.
currentResult = repmat('*',size(randWord));
for i = 1:length(randWord)
A = input('Enter a Letter: ','s');
fprintf('Incorrect! Number of lives left: %d\n',numLives)
disp('Congratulations, you win!')