matrix= [1 0 -1 0.001 4; 5.9 -1 3.15 1 1.11 ] ;cell_conv = (num2cell(matrix));find_one = abs( matrix ) == 1 ;cell_conv(find_one)={'hey'}
MATLAB: How to make it a one line code
shortcode
shortcode
matrix= [1 0 -1 0.001 4; 5.9 -1 3.15 1 1.11 ] ;cell_conv = (num2cell(matrix));find_one = abs( matrix ) == 1 ;cell_conv(find_one)={'hey'}
Best Answer