Create square marix of values for a 2 variable function.
Show older comments
Hello,
I have a two variable function for a given domain i.e. f(x,y) for 0<x<100, 0<y<100 and x and y are discretized I want to form a square matrix where in the columns x remains constant and y varies or vices-versa. I have used the function command to create my function but I am struggling in the next part.
x= 0:0.01:100; y= 0:0.01:100;
function f = f(x,y)
f = cos(x)+sin(y);
end
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!