I want to cut a vector into even number of terms in a loop

조회 수: 1 (최근 30일)
krishna Chauhan
krishna Chauhan 2021년 9월 16일
댓글: krishna Chauhan 2021년 9월 16일
I am using a loop having multiple files having different lengths, and trying to make this length equal to an even number. Using following code but its not working. Any suggestions
save_T = 35;
if save_T is even
continue
else save_T=save_T-1;

채택된 답변

KSSV
KSSV 2021년 9월 16일
save_T = 35;
if mod(save_T,2)==0 % is even
continue
else save_T=save_T-1;
  댓글 수: 2
krishna Chauhan
krishna Chauhan 2021년 9월 16일
Thanks sir @KSSV, but I am wondering why is it not working, it goes to
continue entering input
mode again and again.
krishna Chauhan
krishna Chauhan 2021년 9월 16일
Got it this continue cant be used here. else its working fine.
Thanks

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by