flatten from mathematica to matlab
-
15-11-2019 - |
Question
how can i write this command from mathematica to matlab?
total = Apply[Plus, Flatten[mlat]]/L2
,where L2 is a value and mlat a matrix.
Solution
Simply write:
total = sum(mlat(:)) / L2
OTHER TIPS
No help for matlab, but in Mathematica you may simply write
total = Total[mlat, -1]/L2
in place of
total = Apply[Plus, Flatten[mlat]]/L2
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow