MATLAB: Two outputs of a function

dispfunction

function [cnt,A] = matrice_nou_vechi(A,noua,veche)
cnt=0;
for row=1:size(A,1)
for col=1:size(A,2)
if(A(row, col)==veche)
A(row,col)=noua;
cnt=cnt+1;
end
end
end
how can i see both "cnt" and matrix "A" when a call the function in command window? (without using disp function)

Best Answer

[cnt,A] = matrice_nou_vechi([1,2],3,2)
cnt = 1
A = 1×2
1 3