How to manage multiple objects of multiple types at one place?
Show older comments
Hello to all,
my question will be rather philosophical than technical - I am looking for an inspiration how to design a software with GUI for data processing. I have several measuring instruments, each has various signals and each instrument has different time base (1 sample/min, 1sample/sec...). The data are stored in daily raw-data files. I have small classes which describe each signal and bigger classes which describe each instrument. Signals objects are inside the Instrument objects.
I have a GUI where I can select available instrument, then available signals for the chosen instrument and I can display data, brush it and do other modifications. But only for one selected day = one object of each instrument. Now I want to do the same but with multiple day data. Loading it, displaying, brushing etc. Unfortunately, day data from some instruments can be missing.
I started to write class DataBundle which will manage all day-data objects from all instruments. But I don’t know how to elegantly solve missing day-data-objects in some days. How to do it? Put objects in DataBundle class to an instrument-dedicated array and always check if the element in the array ~isempty() when plotting? I feel there will be a lot of disorganized code in this solution...
Or should I write a higher class for each instrument that can manage the data as a continuous signal over multiple days and not day-data glued together in an array? But still there is the problem with the missing days – should I use something like empty object full of NaNs to manage it as continuous signal? But the size of empty objects is then too big and useless..
Do you have any idea how to elegantly manage multiple objects of the same type combined with multiple objects of other type?
Also any literature recommendation about general class designing would help me a lot.
I will be happy to provide more details if you need. I miss a long experience with classes designing...
Thanks to all in advance...
Petr
Accepted Answer
More Answers (0)
Categories
Find more on Graphics Object Properties in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!