Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. {{-351, -260, -148, -159, 1}.
  2. {-197, -106, 6, -5, 155}
  3. {-194, -103, 9, -2, 158}
  4. {-104, -13, 99, 88, 248}
  5. {28, 119, 231, 220, 380}}
  6.  
  7. For[i = 1, i < Length[diffList] + 1, i++,
  8. setMin1 = {};
  9. setMin2 = {};
  10. setMin3 = {};
  11. setMin4 = {};
  12. setMin5 = {};
  13. For[j = 1, j < Length[diffList[[i]]] + 1, j++,
  14. setMin1 = Append[setMin1, Abs[diffList[[i, j, 1]]]];
  15. setMin2 = Append[setMin2, Abs[diffList[[i, j, 2]]]];
  16. setMin3 = Append[setMin3, Abs[diffList[[i, j, 3]]]];
  17. setMin4 = Append[setMin4, Abs[diffList[[i, j, 4]]]];
  18. setMin5 = Append[setMin5, Abs[diffList[[i, j, 5]]]];]]
  19.  
  20. mat = {{-351, -260, -148, -159, 1},
  21. {-197, -106, 6, -5, 155},
  22. {-194, -103, 9, -2, 158},
  23. {-104, -13, 99, 88, 248},
  24. { 28, 119, 231, 220, 380}};
  25. Map[Min[Abs[#]] &, Transpose[mat]]
  26.  
  27. findminabs[v_] := Min[Abs[v]];
  28. Map[findminabs, Transpose[mat]]
  29.  
  30. m =
  31. {{-351, -260, -148, -159, 1},
  32. {-197, -106, 6, -5, 155},
  33. {-194, -103, 9, -2, 158},
  34. {-104, -13, 99, 88, 248},
  35. {28, 119, 231, 220, 380}};
  36.  
  37. Min /@ Abs[Transpose[m]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement