How do you append data to a 5-D double variable in a matfile? I'm trying to update a data file that I have that is saved as a .mat file, and am easily able to append simple variables, but am not sure how to append 4-D and 5-D variables
이전 댓글 표시
I have all the data for the different dimensions of the variable, but am unsure how to "stitch" them all together and save as a single "datapoint" for the variable. If anyone can point me to a reference or example with which a 4D or 5D variable is appended with new data, I'd be really really grateful. I would be compiling all the data initially through Excel and then trying to append them to a .mat file. Thanks very much in advance.
댓글 수: 1
Joe Yeh
2016년 10월 4일
Can you post some codes so we can know what your variables look like ?
답변 (1개)
KSSV
2016년 10월 4일
out = rand(3,3) ;
filename='myfile.mat';
save(filename,'out'); % Write to MAT file
%%Append 4D matrix
M4 = rand(4,4,10) ;
save(filename,'M4','-append');
%%Append 5D matrix
M5 = rand(10,10,5) ;
save(filename,'M5','-append');
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!