Closed Awelots closed 1 year ago
same requirement, use Mat_VarWriteAppend not work well, use Mat_VarWriteData always return 13, this api not support now. I also need a example to show the use of Mat_VarWriteAppend, I need partially write mat files from a three-dims large matrix.
same requirement, use Mat_VarWriteAppend not work well, use Mat_VarWriteData always return 13, this api not support now. I also need a example to show the use of Mat_VarWriteAppend, I need partially write mat files from a three-dims large matrix.
I had also try these two functions many times before I gave them up in disappointment,now I've chosen a temporary solution,use Mat_VarWrite,I don't write them until wait all my data arrive because they aren't many of them.
for three-dims, I've written a three-dims array in this way.
size_t dims[3] = {3, 15, 4}; matvar_t *mat_vis = Mat_VarCreate("vis", MAT_C_SINGLE, MAT_T_SINGLE, 3, dims, float_array, 0); // float _array is a three-dims array and the number 3 means use the first three digits of the array dims Mat_VarWrite(mat, mat_vis, MAT_COMPRESSION_NONE);
Hope to help you, bro.
I successfully run the tests of mat73_writeappend.at, also with reading the created files in MATLAB.
I successfully run the tests of mat73_writeappend.at, also with reading the created files in MATLAB.
Thank you for your answer.
Mat_VarWriteData
Mat_VarWriteData is deprecated and should not be used.
I have tried test_write_2d_numeric test,if dim_append input is 1 or 2, the result file is not recognized in matlab.
I tested again using matio v1.5.23, hdf5 v1.13.3, MATLAB R2023a on Ubuntu 22.04 and am not able to reproduce.
I have written the structure to mat file, now I want to append the data to the structure, I know that I can use Mat_VarWriteAppend, and this function only supports MAT 7.3, but the MAT 7.3 file I created cannot be opened correctly in matlab. I hope you can tell me why I cannot create MAT 7.3 file or tell me other ways to add data. Thank you very much.