signum fuction with multiple input variables

4 vues (au cours des 30 derniers jours)
Rajbir Singh
Rajbir Singh le 12 Oct 2019
Commenté : Rajbir Singh le 15 Oct 2019
how to define a signum fuction with multiples input vectors.
like, y = sign(v1, v2, v3......)
where v1, v2, v3..... are vectors
  1 commentaire
John D'Errico
John D'Errico le 12 Oct 2019
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.

Connectez-vous pour commenter.

Réponse acceptée

Daniel M
Daniel M le 12 Oct 2019
If the set of v are the same size, then
y = sign([v1,v2,v3]);
  1 commentaire
Rajbir Singh
Rajbir Singh le 15 Oct 2019
Thanx for the help, it works

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by