Here is my code
%This function takes an array of 128Bvalue numbers and returns the equivalent binary
%values in a string phrase
function [PhrasePattern] = GetPatternForValuesFinal(BarcodeNumberValues)
load code128B.mat;
Pattern = {};
%The correspomnding binary sequence for each barcode value is
%identified and fills the cell array
for roll = 1:length(BarcodeNumberValues);
BarcodeRow = str2double(BarcodeNumberValues{1,roll}) + 1;
Pattern{1,roll} = code128B{BarcodeRow,3};
end
%The individual patterns are then converted into a single string
PhrasePattern = strcat(Pattern{1,1:length(Pattern)});
end
The intention of the function is to use an array of numbers, and convert them into a cell array of corresponding binary string values, then concatenate these strings. The error comes from line 11 column 26,
Pattern{1,roll} = code128B{BarcodeRow,3}; subscript indices must be either positive integers or logicals
Does this mean I can't create a cell array of strings..?