I would like to apply a function to several variables. Is there a nice way to do this?
Like:
M = ones(2,2)
N = zeros(3,3)
M = M + 1
N = N + 1
Works but I would like do something of the sort:
M = ones(2,2)
N = zeros(3,3)
L = ?UnknownStructure?(M, N)
for i = 1:length(L)
L(i) = L(i) + 1
end
Or is there a better way entirely to apply a function to a set of variables?
evalin, but I wouldn't recommend it.