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 endend
MATLAB: Converting for loop to vectors
convertmatrix arraymatrix manipulationvectorization
Related Question
- How to Update matrix values
- Hello all, I want to place all strings in a column , and at the same time ignoring all the ‘#N/A’ string from all the columns..and instead of, place the next strings from next colum .after that i wil get a sheet of 2874 rows of strings in one colum
- Sum columns of matrix
- Given a=[1 2 3 4 5], generate m=[2 1 3 4 5; 2 3 1 4 5; 2 3 4 1 5; 2 3 4 5 1; 1 3 2 4 5; 1 3 4 2 5; 1 3 4 5 2; 1 2 4 3 5; 1 2 4 5 3; 1 2 3 5 4].
- How to plot curve using data from for loop
Best Answer