I am looking for a way to reduce writing repetative code and perhaps use for loops instead. I've been told that using eval is not the best approach when using a for loop to try and simplify the below code. Does anyone have any other suggestions/code snippets on how i can streamline this:
RD_ROI=RD(timeLimits(1):timeLimits(2));
RIC_ROI=RIC(timeLimits(1):timeLimits(2));
RLT_ROI=RLT(timeLimits(1):timeLimits(2));
ROB_ROI=ROB(timeLimits(1):timeLimits(2));
RPEC_ROI=RPEC(timeLimits(1):timeLimits(2));
RPS_ROI=RPS(timeLimits(1):timeLimits(2));
RRA_ROI=RRA(timeLimits(1):timeLimits(2));
RUT_ROI=RUT(timeLimits(1):timeLimits(2));
Basically i'm creating new variables with _ROI that take existing variable and extract a region of interest.
Thank you in advance for your time!