Assigning specific values to a vector of length N without for loop?
Show older comments
Suppose i have T = [40 50 60 70], if i want to create a vector of length N that is subdivided by length(T) so that the first N/length(T) entries are 40, the next N/length(T) entries are 50, etc., is there an efficient way to do this without using loops? I was looking at repmat but i don't think that can do it. Any suggestions would great. Thanks
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!