...
Code Block | ||
---|---|---|
| ||
function bool = hasNegatives ( list ) bool = false; for i = 1 : length(list) if ( list(i) < 0 ) bool = true; % fant jeg fant return else bool = false; % fant ikke end end end |
...
Code Block | ||
---|---|---|
| ||
function bool = hasNegatives ( list ) bool = false; for i = 1 : length(list) if ( list(i) < 0 ) bool = true; % fant jeg fant return else bool = false; % fant ikke end end end |