MATLAB把小数转化为百分数形式输出
function B=percent(A) [m,n]=size(A); B=cell(m, n); A=round(A*10000)/100; for i=1:m for j=1:n B{i, j} =[num2str(A(i,j)),'%']; end end
function B=percent(A) [m,n]=size(A); B=cell(m, n); A=round(A*10000)/100; for i=1:m for j=1:n B{i, j} =[num2str(A(i,j)),'%']; end end