Prev: reassigning values of elements in matrix
Next: how to convert the manipulation histogram into an image?
From: Ken on 16 Jul 2010 04:41 Hi. I am running Matlab 2008b. I have written a fairly simple class which stores a few properties, has a few methods. Nothing too fancy. I then created about 10,000 objects, stored them in a cell array and saved that cell array. After clearing the workspace, I loaded the cell array. Every time I access one of the objects or its properties it takes about 5 seconds to obtain the result (whereas it should be instant). Does saving and loading objects have an effect on the way they are handled? Should it cause this sort of slow down? Does editing the class source code affect how loaded objects are handled? Thanks, Ken
From: Ken on 16 Jul 2010 04:55 Update: I created a single object and saved it. The resulting .mat file was 251KB but my object only had a few bytes of data in it. Why would the .mat file be so large? Is Matlab saving the source code with the object? What effect does this have when the object is then loaded?
From: Ken on 16 Jul 2010 05:04
"Ken " <kmailuk+mathworks(a)gmail.com> wrote in message <i1p6pb$6sr$1(a)fred.mathworks.com>... > Update: I created a single object and saved it. The resulting .mat file was 251KB but my object only had a few bytes of data in it. Why would the .mat file be so large? Is Matlab saving the source code with the object? What effect does this have when the object is then loaded? Ooops. Ignore the above. I made the silly mistake of typing "save filename" and not "save filename objectname". But I am still having problems with the loaded objects being terribly slow. Any thoughts? Thanks, Ken |