I have txt-files such as the one attached, where there are first lines describing the data in the file and then a table containing all the numeric data. I have a class in my mat-file and within it the following properties:
classdef measurement_data
properties
t0 = 0
dt = 0
data = []
time = []
name = ''
unit = ''
metadata = ''
end
end
How, now, can I read data from a text file and create objects out of the different recorded signals? Each signal in the same file has the same start time, delta t, and time, but they all have different measurement data, names, and units. In different tutorials about OOP in Matlab, I've usually just seen an example where they set the value of a property manually, for example like this:
SD1_SPEED_MEASURED_1 = measurement_data;
SD1_SPEED_MEASURED_1.dt = 300;
But how would I go about setting the value by reading it from the data?
I hope it's at least somewhat clear what I'm going for, as I would really appreciate it if someone could explain this to me or point me to some documentation that might be helpful because my googling has done little to help me.
0 Comments
Sign in to comment.