Is a MatFile object derived from the handle class?

2 Ansichten (letzte 30 Tage)
Alex King
Alex King am 26 Okt. 2018
Bearbeitet: Alex King am 26 Okt. 2018
I'm using a MatFile object to avoid loading a large mat file into memory. The MatFile object is used as an input to a function where I append my data. Does the MatFile object act like a handle, only referencing the object on my disk from inside my function? A rough example is shown here:
measurement = matfile(filename, 'Writable', true);
measurement.TimeStamps = 0;
measurement.Data = zeros(1, 2);
function measurement = saveData(event, measurement)
size_timestamp = size(measurement, 'TimeStamps');
measurement.TimeStamps(size_timestamp(1) + 1, 1) = event.TimeStamps(end);
measurement.Data(size_timestamp(1) + 1, :) = mean(event.Data);
end

Antworten (0)

Kategorien

Mehr zu Workspace Variables and MAT-Files finden Sie in Help Center und File Exchange

Produkte


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by