You can follow any comments to this entry through the RSS 2.0 feed.
You can skip to the end and leave a comment. Pinging is currently not allowed.
5 CommentsOldest to Newest
To avoid a cumbersome 'if/else' statement in the simple method, I like to assign an empty matrix to result before the loop:
result = ;
for k = 1:length(fileInfo)
result = [result; x]; etc.
That's cleaner and more efficient. I think I started using the if/then/else way because I had a vague memory of an edge case where the concatenation of an empty variable with a non-empty one did not work. I can't reproduce that so I have been imagining it.
would matfile() be helpful to speed up the load() bit?
I don't recall the MAT file object being faster than the load function. The MAT file object does allow you to access parts of an array in a MAT file, but I assume the user here wants to load all the data.
l Thank you, sir, for your wonderful tips! we learned a lot from you. I also publish an article about for loop . Thank you may like work…