MATLAB: Dot indexing not supported

dot indexing

I'm trying to save and load 3 coloums of information but when I try to load them I get an error message saying dot indexing is not supported for variable of this type
particledata=[1,1.1,2.6;2,1.2,1.2;3,1.5,1.8;4,1.5,1.7;5,1.9,1.2]
save input.dat particledata -ascii
load input.dat

Best Answer

Try the functions instead of command line way:
particledata=[1,1.1,2.6;2,1.2,1.2;3,1.5,1.8;4,1.5,1.7;5,1.9,1.2]
save('input.dat', 'particledata', '-ascii')
% Now recall it.
s = load('input.dat')
recalledData = s.particledata % should be the same as particledata.
Related Question