Can someone help me convert this Rstudio code to Matlab?
Show older comments
t <- rep(seq(0,23.5,.5),11)
I really have no idea whats going on here since its in Rstudio, I think it has something to do with repeating a sequence!
Answers (1)
Star Strider
on 8 Feb 2018
So:
t <- rep(seq(0,23.5,.5),11)
appears to be equivalent to:
t = repmat([0,23.5,.5], 1, 11);
2 Comments
Walter Roberson
on 8 Feb 2018
I would think instead
t = repmat(0:.5:23.5, 1, 11);
Star Strider
on 8 Feb 2018
I agree. (This is my first exposure to ‘R’.)
Categories
Find more on MATLAB 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!