Function for Script. I need to write a Function that selects the positive and negative numbers from a matrix. How to write this?
Ältere Kommentare anzeigen
I need to write a Function that selects the positive and negative numbers from a matrix. How to write this?
Akzeptierte Antwort
Weitere Antworten (1)
John Petersen
am 21 Jan. 2015
a = 0.5 - rand(3,3);
%Positive numbers
a(a>=0)
% negative numbers
a(a>0)
1 Kommentar
ricsf
am 21 Jan. 2015
Kategorien
Mehr zu Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!