How can I make a multi-variable function?
1 view (last 30 days)
Show older comments
Jennifer Wail
on 3 Jun 2015
Commented: Jennifer Wail
on 3 Jun 2015
I want to turn f(x,y,z) = x^2 + 3y ^2 + 4z^2 – 2xy + 5x – 3y + 2z into an anonymous function
0 Comments
Accepted Answer
James Tursa
on 3 Jun 2015
Do you mean like this?
f = @(x,y,z) x.^2 + 3*y.^2 + 4*z.^2 - 2*x.*y + 5*x - 3*y + 2*z
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices 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!