One way to evaluate a two variable symbolic expression for every combination of values between 10 and -10 in MATLAB is to use a for-loop and the subs function to substitute each combination of values into the symbolic expression. Here is an example code that demonstrates this approach:
main.m581 chars21 lines
In this example, the linspace function is used to generate 21 equally spaced values between -10 and 10 for both x and y. The results matrix is initialized to store the evaluated expression for each combination of x and y values. The for-loops iterate over all combinations of x and y values and subs is used to substitute each combination into the symbolic expression f and evaluate it. Finally, the results are plotted using the surf function.
gistlibby LogSnag