unique identifier for importing arrays.
2 views (last 30 days)
Show older comments
I am trying to create a unique identifier for a script. I bring in the file as csv, and make a variable out of it.
clc, clear all
A = csvread('Cutlist.csv')
S_A= size(A)
iter=10000
iter_f = iter+ size(A)
iterf = iter_f(1,1)
i = (iter:iterf)'
This way seems inefficient, and doesn't fully address the issue. The A vector (1344*1) are stick lengths. My final script needs to account for many different kinds, colors, cuts, types for those sticks.
So the end result that I am seeking for good data should be something like
Pl_id(10000) % First Stick Element.
Pl_id(11344) % Last stick element of imported list, with n=number of elements, that will differ for each import.
Pl_id(%apply a custom identifier for each stick).
but i've read everyone say not to do such iteration on forums. I read deep into HDF5 thing, and would like to implement that. But I am all confused how i would do that. My structure needs an index/identifier>to take data from excel, and send it back to the external software.
Pl_id. %some structure you can advice implementing.
& it needs to be able to respond to other variables shown in picture. After a stick is processed, I would like to discard/eliminate making the remaining dataset smaller iteratively.
<<
>>
I have attached the picture of cutlist string I used,then point from where I picked the data, and the last file shows a sample data file that is used in our fabrication equipment's software. I am trying to build a new optimizer for efficient use of lineal material.
2 Comments
Image Analyst
on 17 Aug 2018
You've probably delayed a good response by forgetting to attach the text 'Cutlist.csv' file.
And you say you want "to take data from excel" (whatever that means) but forgot to attach the Excel workbook, or attach your xlsread() code or ActiveX code, depending on what you're wanting and how you're doing it.
And after an item is processed, why do you want to remove/delete it from the dataset? Normally when people index along an array and do things with the values, they don't delete that element/member from the array, making it shorter. Why do you think you need to do that?
Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!