Converting for loop to vectors
Show older comments
for i=1:size(ScFreq,1)
if (ScFreq(i,1)== -Prim)&&(ScFreq(i,5)== 1)
Scr = ScFreq(i,3);
Freq = ScFreq(i,4);
else
if (ScFreq(i,1)== -Prim)&&(ScFreq(i,5)== 2)
if (Scr ~= -1)
ScFreq(i,3) = Scr;
ScFreq(i,4) = Freq;
Scr = -1;
end
end
end
end
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!