Function for Script. I need to write a Function that selects the positive and negative numbers from a matrix. How to write this?
Mostra commenti meno recenti
I need to write a Function that selects the positive and negative numbers from a matrix. How to write this?
Risposta accettata
Più risposte (1)
John Petersen
il 21 Gen 2015
a = 0.5 - rand(3,3);
%Positive numbers
a(a>=0)
% negative numbers
a(a>0)
1 Commento
ricsf
il 21 Gen 2015
Categorie
Scopri di più su Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!