필터 지우기
필터 지우기

break-continue for loop

조회 수: 2 (최근 30일)
Megha
Megha 2018년 8월 9일
편집: Megha 2018년 8월 9일
for a full wave rectifier (sine wave with only +ve cycles) type dataset.
is it possible to break each half cycle (0-180)
into different variables??
e.g. I have 2.5 cycles having 5-maxima and 6-minima.,
now is it possible to generate 5 different variables,
one corresponding to each cycle? can we do it with for loop? How?
I have tried somethuing like below,
for i = 1:length(GGG)
if (GGG(i,1)>1.5)
L1(i,1) = GGG(i,1);
else
if (GGG(i,1)<1.5)
break
end
end
end
Now I dont know how to run it furthur???
  댓글 수: 2
Ameer Hamza
Ameer Hamza 2018년 8월 9일
The question description is not clear that what is your waveform and how do you want to divide it. It will be better if you can add an example e.g. an image or a simple numeric example.
KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 8월 9일
편집: KALYAN ACHARJYA 2018년 8월 9일
Which variables are you talking? As per my understanding, there is only two variable in full wave signal pattern and amplitude and time. You want to output look like a half wave cycle.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by