| | |
Help understanding some Matlab syntax (I'm porting it to python)
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
•
•
Join Date: Sep 2009
Posts: 6
Reputation:
Solved Threads: 0
Ok so if anyone can spare a few minutes and can tell me what each of these things are in terms of python (or plain english), that would be FANTASTIC!
what exactly is going on here? what does this do:
digitdata = [digitdata; D];
?
is it appending the D object (which im guessing came from the digit1.mat it created earlier) onto digitdata?
just to be clear the .ascii file contains a file of data (1's and 0's about 1000 characters on individual lines)
also what is this doing:
digitdata = digitdata/255;
?
so is size(digitdata,1) equivelent to len(digitdata)
?
ok, now for the next batch...
is total_amount == xx, size_of_set == to length_of, and set_num==numsets
??
Also what does this even do:
input_set = zeros(xx, length_of, numsets);
?
So what is this doing?
input_set(:,:,b);
?
and I have absolutely no clue what is going on here:
I think I can get everything from here.
any help would be appreciated. I can figure most stuff out, and most of this stuff is semantic so I can't look it up online very easily.
(this is in a for loop where d is defined as 1-9) D = load(['digit' num2str(d) '.ascii'],'-ascii'); save(['digit' num2str(d) '.mat'],'D','-mat'); then later in a different function: digitdata=[]; targets=[]; load digit0; digitdata = [digitdata; D]; targets = [targets; repmat([1 0 0 0 0 0 0 0 0 0], size(D,1), 1)]; load digit1; digitdata = [digitdata; D]; targets = [targets; repmat([0 1 0 0 0 0 0 0 0 0], size(D,1), 1)]; load digit2; digitdata = [digitdata; D]; targets = [targets; repmat([0 0 1 0 0 0 0 0 0 0], size(D,1), 1)]; (etc....) digitdata = digitdata/255; totnum=size(digitdata,1);
what exactly is going on here? what does this do:
digitdata = [digitdata; D];
?
is it appending the D object (which im guessing came from the digit1.mat it created earlier) onto digitdata?
just to be clear the .ascii file contains a file of data (1's and 0's about 1000 characters on individual lines)
also what is this doing:
digitdata = digitdata/255;
?
so is size(digitdata,1) equivelent to len(digitdata)
?
ok, now for the next batch...
input_set = zeros(xx, length_of, numsets); (then later in another function) [total_amount size_of_set set_num]=size(input_set);
is total_amount == xx, size_of_set == to length_of, and set_num==numsets
??
Also what does this even do:
input_set = zeros(xx, length_of, numsets);
?
So what is this doing?
input_set(:,:,b);
?
and I have absolutely no clue what is going on here:
input_set(:,:,b) = digitdata(randomorder(1+(b-1)*batchsize:b*batchsize), :);
any help would be appreciated. I can figure most stuff out, and most of this stuff is semantic so I can't look it up online very easily.
![]() |
Similar Threads
- Python to Matlab (Python)
- Matlab and Python connectin (Python)
- Correct syntax? (Python)
- Python Virtual Machine Questions (Python)
- Incomprehensible syntax error (Python)
- Python 3.0? (Python)
- "choose" in Python? (Python)
- Is it too late to learn Python (Python)
Other Threads in the Computer Science Forum
- Previous Thread: How to find software dev partnerss?
- Next Thread: BNF creation
| Thread Tools | Search this Thread |
ai algorithm algorithms amazon assignment assignmenthelp assignments automata battery bigbrother binary bittorrent bizarre bletchleypark blogging bomb business cern codebreaker compiler computer computers computerscience computertrackingsoftware conversion csc data dataanalysis dataintepretation development dfa dissertation dissertations dissertationthesis dissertationtopic ebook employment energy extensions floatingpoint foreclosuresoftware fuel gadgets geeks givemetehcodez government graphics hardware history homeowners homeworkassignment homeworkhelp humor ibm idea ideas internet iphone ipod itcontracts jobs kindle laser laws lsmeans mainframes marketing mining mobileapplication msaccess netbeans networking news os p2p piracy piratebay programming research sas science security sex simulation software spying sql study supercomputer supercomputing sweden technology textfield turing turingtest two'scompliment uk virus warehouse ww2





