Borrar filtros
Borrar filtros

Three element vector function?

6 visualizaciones (últimos 30 días)
Ian
Ian el 31 de En. de 2014
Editada: Walter Roberson el 31 de En. de 2014
Create a MATLAB function that, given a three element vector [x1 x2 x3] as input, calculates r = x1^2 + x2^2 − x3^2.

Respuesta aceptada

Amit
Amit el 31 de En. de 2014
function r = myfunc(x)
r = x(:,1).^2 + x(:,2).^2 - x(:,3).^2 ;

Más respuestas (0)

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by