unique identifier for importing arrays.

1 visualización (últimos 30 días)
Gaurav
Gaurav el 17 de Ag. de 2018
Comentada: Gaurav el 17 de Ag. de 2018
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 comentarios
Image Analyst
Image Analyst el 17 de Ag. de 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?
Gaurav
Gaurav el 17 de Ag. de 2018
Sorry, it was my first post. I felt it kept getting verbose.I tried extracting data multiple ways, and I have fair deal of flexibility. instead of making dataset shorter, i can use logical operator that marks processed sticks.I am feeling lost with choices, not having clarity about best method to pursue the end goal. Like, using HDF5? or using Struct instead?or getting value someway from subsref/ or going with numel command. :(

Iniciar sesión para comentar.

Respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by