Top-rated recipes tagged "matlab"http://code.activestate.com/recipes/tags/matlab/top/2016-09-22T12:25:30-07:00ActiveState Code RecipesSimple Matlab/Ocave like arrays conversion to numpy.arrays in python interpreter (Python) 2016-09-22T12:25:30-07:00Przemyslaw Podczasihttp://code.activestate.com/recipes/users/4179716/http://code.activestate.com/recipes/580700-simple-matlabocave-like-arrays-conversion-to-numpy/ <p style="color: grey"> Python recipe 580700 by <a href="/recipes/users/4179716/">Przemyslaw Podczasi</a> (<a href="/recipes/tags/array/">array</a>, <a href="/recipes/tags/interpreter/">interpreter</a>, <a href="/recipes/tags/matlab/">matlab</a>). </p> <p>Matlab/Octave syntax for 1D/2D arrays is more packed and doesn't require putting extra ',' and extra '[', ']' between dimensions. For this I wrote a parser that intercepts python interpreter and using numpy functionality parses Matlab's style arrays 1D and 2D into numpy.arrays.</p> Matlab code for displaying 'struct' details (Python) 2008-09-05T13:31:54-07:00Kaushik Ghosehttp://code.activestate.com/recipes/users/4166965/http://code.activestate.com/recipes/576489-matlab-code-for-displaying-struct-details/ <p style="color: grey"> Python recipe 576489 by <a href="/recipes/users/4166965/">Kaushik Ghose</a> (<a href="/recipes/tags/matlab/">matlab</a>, <a href="/recipes/tags/recursion/">recursion</a>, <a href="/recipes/tags/structure/">structure</a>, <a href="/recipes/tags/tree/">tree</a>). </p> <p>This code, when passed a MATLAB structure, will recursively go into it and print out the form of the struct.</p>