Hi,
I have read multiple posts related to the subject error but couldn't find the answer related to my query. Any help is much appreciated.
I have an excel file (256x2) and I am reading it in MATLAB with xlsread. The task is to find a number (coming from an input data array) in the first column and locate its neighbouring second column entry. I am doing it by following way.
V = Excel_file(Excel_file(:,1) == Column1(i),:);
After locating the respective entry, subtract it from 256 and store the result in mod_cal variable which is also declared as an array.
The code is doing fine uptill here. Problem begins in the next part. I have to find the mod_cal variable's value in the second column now and whatever its respective neighbouring entry would be in the first column, i need to read it in an array named mod_MulInverse and that is going to be my result.
W = Excel_file(Excel_file(:,2) == mod_cal(i),:);
Complete code is as follows.
mod_MulInverse=zeros(1, 256);
Excel_file = xlsread('powerValues.xlsx');
if(Column1(i)==0 || Column1(i)==1)
mod_MulInverse(i)=Column1(i);
V = Excel_file(Excel_file(:,1) == Column1(i),:);
W = Excel_file(Excel_file(:,2) == mod_cal(i),:);
The first part works fine, I get an error for the second part which says that the index exceeds array bounds for mod_MulInverse(i)=W(1) line.
Please help me understand the issue here and resolve the error.
Thank you !