I need to repeat the same sequence 33 times.
t_puls = [0 30 30 60 60 90 90 120 120 910]';
this describes the time for my Current I. The number 0 being 0 seconds and 910 being 910 seconds.
I_puls = [11.5 11.5 2.5 2.5 11.5 11.5 2.5 2.5 11.5 11.5]';
This describes my current according to the time.
I need this exact sequence to be repeated exactly the way it is, but 33 times without pause. Can anyone help me?

답변 (2개)

KSSV
KSSV 2021년 11월 24일

0 개 추천

Read about repmat.
A = [1 2 3] ;
B = repmat(A,1,3)
B = 1×9
1 2 3 1 2 3 1 2 3

댓글 수: 4

thanks!
this works for the I_puls, however i need to increase the time by 880 seconds in each new repetition, do you have an idea how?
KSSV
KSSV 2021년 11월 24일
What do you mean by increasing time time by 880 sec?
my column starts with 0 and ends with 910.
I need the next repetition to start with 910 and end with 1820. and then repeat that 33 times
so i need to repeat my column but every time adding these 910 seconds.
i meant 910 seconds, not 880

댓글을 달려면 로그인하십시오.

Image Analyst
Image Analyst 2021년 11월 24일

0 개 추천

Try this:
n = 911 * 33;
m = reshape(0:(n-1), [], 33);

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2021년 11월 24일

답변:

2021년 11월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by