More code cleanup: remove redundant MATLAB ui code and fix function calling
Fixes; average2 almost working
Fixes; average2 almost working
Fix average2 logic