Reorder vector without for loop
3 views (last 30 days)
Show older comments
I would like to do the following without using the for loop:
for delta=1:540 % get circle points from the line.
vectorB((delta-1)*(1080)+1:(delta)*(1080),:)=vectorA(delta:540:583200,:); % both vecs of size 583200x1000
end % delta
This loop grabs every 540th point in a vector, stores, then increments the amount by 1 and repeats,...,etc.
Is it possible to use a built in function to do the same? Also, I plan to export to C, so whatever function must be supported.
Currently, matlab is more performant than the C coder result.
0 Comments
See Also
Categories
Find more on Loops and Conditional Statements 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!