Function for Script. I need to write a Function that selects the positive and negative numbers from a matrix. How to write this?
Afficher commentaires plus anciens
I need to write a Function that selects the positive and negative numbers from a matrix. How to write this?
Réponse acceptée
Plus de réponses (1)
John Petersen
le 21 Jan 2015
a = 0.5 - rand(3,3);
%Positive numbers
a(a>=0)
% negative numbers
a(a>0)
1 commentaire
ricsf
le 21 Jan 2015
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!