I have written a for loop in which to split 5000 rows accordingly along each of the columns that they are in.
Example of the cell array that contains those rows:
From that picture, i would like to split each row accordingly along their respective columns of that row starting from the first column to the end.
This is the code that i have written:
for i = pdbindex(:,1)
clean_pdb = regexprep(pdbindex, ':', ' '); % removes the colon (:) from the array and replaces it with a whitespace
pdb2char = char(clean_pdb); % converts the cell array into a character array
pdb2split = strsplit(pdb2char, ' '); % does a split based on the character array followed by a delimiter, which is the white space
end
I have used Regular Expressions to replace the colons (:), with a whitespace. However, it is throwing me an error stating Input strings must have one row.
. I don't know how to solve this.
Please advise.