Problem to update new column value of an excel file using MATLAB
Show older comments
Hi everyone. I really need a help with this problem. I want to update the y-axis column of an excel file (which i attached) by multiplying it with -1. Initially, i thought i got the solution. However, when i try to run, it display an error:
"Index in position 2 exceeds array bounds.Error in Change_Y_axis (line 29), dataset(:,k)=MarkerY_2(:,A);
I already make numbers of repairs, however the problem is still there.
Can anyone guide me and help me with this problem? I desperately need help :(
clc;
clear all;
close all;
c = '26_R2';
dataset = xlsread('TEST.xlsx',c,'A1:CJ1200');
Frame = dataset(:,1);
%% FOR SAVING PURPOSES %%
for A = 0:1:27 % Maximum no. of markers is 28
j = 3*(A+1);
MarkerY(:,A+1) = dataset(:,j); %Saving to y-Axis
end
MarkerY_2=[];
for A = 1:1:28
[No_row,No_column]=size(Frame);
MIN = min(Frame);
for G = MIN:1:No_column
MarkerY_2(A,Frame(G)) = MarkerY(A,Frame(G))*(-1); % I have problem at here
end
k = 3*(A);
dataset(:,k)=MarkerY_2(:,A);
end
Answers (0)
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!