# MATLAB: Trouble with a correlation analysis code

codecorrelationdataexcel

I'm writing a code to run a correlation analysis between two variables under certain conditions. I want to see if there is a correlation between the second column and the first if the second's value is greater than 0. I wrote the following code, but MATLAB continues to print the error, "Index exceeds matrix dimensions".
clear all indicators = xlsread('largedata1.xlsx');X = xlsread('largedata1.xlsx', 1, 'A:A');rows = indicators(:,2)>0; %Logical vector with the rows which satisfy all conditions.if any(rows) % True if there is at least 1 row which meats the condition.    md1 = fitlm(indicators(rows, [2]), X(rows)); % Fit with the rows which satisfy condition.end
clear all indicators = xlsread('largedata1.xlsx');X = xlsread('largedata1.xlsx', 1, 'A:A');rows = indicators(:,2)>0; %Logical vector with the rows which satisfy all conditions.if any(rows) % True if there is at least 1 row which meats the condition.  md1 = fitlm(indicators(rows, [2]), X(rows)); % Fit with the rows which satisfy condition.end>> md1md1 = Linear regression model:  y ~ 1 + x1Estimated Coefficients:                 Estimate       SE        tStat       pValue                   ________    _________    ______    __________    (Intercept)    0.056209    0.0049663    11.318    4.6459e-28    x1              0.18966      0.10075    1.8825      0.060056Number of observations: 1022, Error degrees of freedom: 1020Root Mean Squared Error: 0.12R-squared: 0.00346,  Adjusted R-Squared 0.00249F-statistic vs. constant model: 3.54, p-value = 0.0601