I have a matrix of structs:
s(1:2,1:3) = struct('a',1,'b',2);
I have a function that has 2 int inputs, and calculates an int values according to some logic. How can I Apply the function on all the matrix s using the fields of each struct ('a' and 'b') as input for the function. The result matrix should be the same size as s just with the result of the function as data.
function f = SomeFunctionIWrote(a,b)
%...Some calculations...
f = result;
end
Thanks, Guy.