Three element vector function?

6 次查看(过去 30 天)
Create a MATLAB function that, given a three element vector [x1 x2 x3] as input, calculates r = x1^2 + x2^2 − x3^2.

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by