How can I make a multi-variable function?

I want to turn f(x,y,z) = x^2 + 3y ^2 + 4z^2 – 2xy + 5x – 3y + 2z into an anonymous function

 Respuesta aceptada

James Tursa
James Tursa el 3 de Jun. de 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

1 comentario

Jennifer Wail
Jennifer Wail el 3 de Jun. de 2015
Thank you, I was doing that but something else wasn't working. I'll post another question on it.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 3 de Jun. de 2015

Comentada:

el 3 de Jun. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by