Hello! What I am trying to do is have a 'automated picking list.' In other words, I will have a checklist of item. (I.e. Apple, pear, banana). Each of the items have a specific barcode, 321, 654, and 987 respectively. So, when an item is scanned, I would like it to be automatically 'checked' off the list. Below I put a matlab script with the general idea. I want to implement this logic with the App Designer Toolbox, however I am not able to edit the. Anything with a white background is editable, and a grey background is uneditable. I want to implement the for and if else loops in the .m code to line 49, the value of the checkbox, to change it's toggle instead of print a statement but I cant edit it! any suggestions?
barcode = [321 654 987]; prompt = 'Enter a string of digits to represent a barcode: ';x = input(prompt);c = 0;%For loop will check if scanned item is within list, if so will mark c = 1
for i = 1:length(barcode) if barcode(i) == x c = 1; endend%If loop will check item if c = 1
if c == 1 disp('Item Checked!')else disp('ERROR: Item Not Required')end
Best Answer