signum fuction with multiple input variables

2 次查看(过去 30 天)
how to define a signum fuction with multiples input vectors.
like, y = sign(v1, v2, v3......)
where v1, v2, v3..... are vectors
  1 个评论
John D'Errico
John D'Errico 2019-10-12
Since signum is only defined for one variable in general (MATLAB or not) what do you want to see for multiple inputs? Give a small example of what you would be looking for, with both the inputs and the outputs you would expect.

请先登录,再进行评论。

采纳的回答

Daniel M
Daniel M 2019-10-12
If the set of v are the same size, then
y = sign([v1,v2,v3]);

更多回答(0 个)

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by