Matlab function handle workspace shenanigans
问题 In short : is there an elegant way to restrict the scope of anonymous functions, or is Matlab broken in this example? I have a function that creates a function handle to be used in a pipe network solver. It takes as input a Network state which includes information about the pipes and their connections (or edges and vertices if you must), constructs a large string which will return a large matrix when in function form and "evals" that string to create the handle. function [Jv,...] =