My MATLAB keeps reading old .mat files as uint32 even though it ain't, why is it and how can I fix this?
19 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Brando Miranda
el 21 de Mzo. de 2016
Respondida: Paul Kane
el 23 de Mayo de 2019
I thought of upgrading/updating my MATLAB, might that fix the issue?
Why is it happening in the first place?
As in:
load(data_set_path);
then if it had saved a struct there is doesn't return it but reads it as uint32 and throws error:
Warning: Variable 'data4cv' originally saved as a cross_validation_data
cannot be instantiated as an object and will be read in as a uint32.
> In pca_train (line 5)
2 comentarios
James Tursa
el 21 de Mzo. de 2016
Looks like it was saved as an OOP object of type cross_validation_data, not a struct. Do you have the code for cross_validation_data?
Respuesta aceptada
Steven Lord
el 21 de Mzo. de 2016
You saved one or more objects in the MAT-file, but the definition for the object's class is not available to MATLAB when it loads the data so it doesn't know how to convert the raw data from the MAT-file into an instance of the object.
Try to remember if you were using any third-party toolboxes when you created that MAT-file. If so, check if they are still accessible to MATLAB. I'm betting that you were using such a toolbox but it is no longer available to MATLAB when you try to LOAD the file.
2 comentarios
Walter Roberson
el 21 de Mzo. de 2016
Is that class in your MATLAB path at the time you try to do the load() ?
Más respuestas (1)
Paul Kane
el 23 de Mayo de 2019
If you wrote the app, open it in AppDesigner and run it. Back at the Matlab command window, you can now load your mat file and voila, Matlab now understands your structure.
0 comentarios
Ver también
Categorías
Más información sobre MATLAB Compiler en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!