Let\'s say I have a function, like:
function [result] = Square( x ) result = x * x; end
And I have an array like the following,
Have you considered the element-by-element operator .*?
.*
See the documentation for arithmetic operators.