% % % case1:ss为稀疏矩阵 [i,j,val] = find(ss) data_sparse = sparse(i,j,val); data_out = [i,j,val]; save -ascii data.txt data_out
% % % case2:aa为满存储矩阵 aa = [ 1 2 3;4 5 6;7 8 9]; save -ascii data_aa.txt aa
原文:https://www.cnblogs.com/xdd1997/p/14274379.html