Hi, I met this problem when parsing a gps log.
I made an Enumeration Class GpsState as follows.
Then I created an array of GpsState to record all the states of the log. The process was painfully slow.
Finally, I found out what the problem was caused by the assign of Enumeration Class array.
I simplified the code as follows, the process takes about 4.6s.
test_num = 1e5;
gps_state = repmat(GpsState.Lost,test_num,1);
for ii = 1:test_num
gps_state(ii) = GpsState.RTK_Fix;
Is there any problem with my usage mode of Enumeration Class?
Thanks for your reading.