Just wanted to create a thread where I could chuck all my questions in regards to Matlab.
I'll start the ball rolling by asking:
';' is like ';' in C++? i.e. it simply ends the command line (without printing out the elements of the array/matrix/variable etc after pressing enter being the second feature of the symbol)? I've just got an M file (.m) that has a line that goes something like (it's preceded by the two to make a latter question make sense)...
[PHP]digitdata=[];
targets=[];
load digit0; digitdata = [digitdata; D]; targets = [targets; repmat([1 0 0 0 0 0 0 0 0 0], size(D,1), 1)];[/PHP]
So the way I see it, there are 3 lines of code simply put in one line to save space?
I also would just like to clarify that I fully understand what is being done here. Firstly, we are loading the .mat files called 'digit0' into the workspace of Matlab. Then we are creating a matrix called 'digitdata' with 'digitdata' rows and D columns? The last part I don't understand.
Lastly...
[PHP]digitdata=[];[/PHP]
Does this line (and the second one also in the example above), simply create an array with a potentially infinite number of elements? i.e. it's like the initialization function?
EDIT: Forgot to mention that the 'digit0' files contains an array of XXXX * 784.


LinkBack URL
About LinkBacks