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

1 Ansicht (letzte 30 Tage)
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;

Akzeptierte Antwort

KSSV
KSSV am 16 Sep. 2021
save_T = 35;
if mod(save_T,2)==0 % is even
continue
else save_T=save_T-1;
  2 Kommentare
krishna Chauhan
krishna Chauhan am 16 Sep. 2021
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 am 16 Sep. 2021
Got it this continue cant be used here. else its working fine.
Thanks

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by