set @sql=null;SELECTGROUP_CONCAT(DISTINCTCONCAT('SUM(CASE t.type WHEN ''',t.type,'''',' THEN t.id ',' else 0 END ) ',t.type)) INTO @sqlFROM test1 t;set @sql =CONCAT('SELECT ',@sql,' from test1 t'
矩阵变元素,变列向量 W1(Z1 < Z2) = nan; % Z1,Z2 all matrix,Only plot points where Z1 > Z2;Z1 < Z2位置值填为NaN x = x(:); % Now x is a 30-by-1 vector; matrix变列vector技巧 3D表面图 hand = figure; % Handle to the