My code taking too much time
Afficher commentaires plus anciens
Here is my code. How can I reduce that time without changing the result?
clear all;clc;close all;
L=1000;
c = randn(1,1000000);
cont3 = 1;
while cont3 < length(c)+1
if(abs(c(cont3)) < 1 || abs(c(cont3)) > 10)
c(cont3) = randn(1);
cont3 = 0;
end
cont3 = cont3+1;
end
c;
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Space-Time Adaptive Processing 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!