I need to know how to create the following vectors inmatlab Each vector needs to
ID: 3609001 • Letter: I
Question
I need to know how to create the following vectors inmatlab Each vector needs to have 1000 numbers in that repeat in thefollowing order. Is there some type of built in matlab function that allowsthese vectors to be repeated. vector_1=[1,0,1,0,1,0,...........]; vector_2=[0,1,2,3,4,5,0,1,2,3,4,5,0,1,........]; Thanks in advance. I need to know how to create the following vectors inmatlab Each vector needs to have 1000 numbers in that repeat in thefollowing order. Is there some type of built in matlab function that allowsthese vectors to be repeated. vector_1=[1,0,1,0,1,0,...........]; vector_2=[0,1,2,3,4,5,0,1,2,3,4,5,0,1,........]; Thanks in advance.Explanation / Answer
Dear, Creating repeated vectors can done asfollows, Creating vector_1 = {1,0,1,0,1,0....... } >>for j = 1 : 500 >>v = [ 1 0 ] End >> Creating vector_2 = {0,1,2,3,4,5,0,1,2,3,4,5,.......... } >>for j = 1 : 166 >>v = [0 1 2 3 4 5] end >> " I hope this will help you "Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.