[{"data":1,"prerenderedAt":81},["ShallowReactive",2],{"\u002Fblog\u002Fpython-for-matlab-users":3,"more:\u002Fblog\u002Fpython-for-matlab-users":62},{"id":4,"title":5,"body":6,"category":51,"date":52,"description":12,"extension":53,"image":54,"meta":55,"navigation":56,"path":57,"seo":58,"stem":59,"summary":60,"__hash__":61},"blog\u002Fblog\u002Fpython-for-matlab-users.md","Python for MATLAB Users and Vice Versa",{"type":7,"value":8,"toc":47},"minimark",[9,13,44],[10,11,12],"p",{},"Engineers who learned numerical computing in MATLAB often find the transition to Python straightforward in concept but frustrating in practice. The mental models are similar, but the syntax and ecosystem are different enough to cause constant friction.",[10,14,15,16,20,21,24,25,28,29,31,32,35,36,39,40,43],{},"The most important shift is indexing: MATLAB uses 1-based indexing while Python (and NumPy) uses 0-based. Matrix multiplication in MATLAB is the default with ",[17,18,19],"code",{},"*",", while in Python you must use ",[17,22,23],{},"@"," or ",[17,26,27],{},"numpy.matmul()",", because the ",[17,30,19],{}," operator performs element-wise multiplication. MATLAB's ",[17,33,34],{},"plot(x, y)"," maps directly to matplotlib's ",[17,37,38],{},"plt.plot(x, y)",", but you need to explicitly call ",[17,41,42],{},"plt.show()"," to render the figure.",[10,45,46],{},"For numerical solvers, scipy.integrate and scipy.optimize cover the vast majority of what MATLAB's Toolboxes provide. The syntax is more verbose, but the underlying algorithms are equivalent and, in many cases, more transparent.",{"title":48,"searchDepth":49,"depth":49,"links":50},"",2,[],"Programming","2023-05-08","md","\u002Fimages\u002Fblog\u002Fpython-for-matlab-users.jpg",{},true,"\u002Fblog\u002Fpython-for-matlab-users",{"title":5,"description":12},"blog\u002Fpython-for-matlab-users","A side-by-side comparison of Python and MATLAB workflows for engineers making the transition, covering array operations, plotting, and numerical solvers.","Py4JBbiWGQRHuZzDGZSKTjrLjQLM-qKyc_bgg4IwYf0",[63,69,75],{"path":64,"title":65,"date":66,"category":67,"image":68},"\u002Fblog\u002Fnatural-trend-curves","Natural Trend Curves","2023-09-14","Data Science","\u002Fimages\u002Fblog\u002Fnatural-trend-curves.jpg",{"path":70,"title":71,"date":72,"category":73,"image":74},"\u002Fblog\u002Fmedium-voltage-design-data-centers","Medium Voltage Design for Data Centers","2023-07-20","Engineering","\u002Fimages\u002Fblog\u002Fmedium-voltage-design-data-centers.jpg",{"path":76,"title":77,"date":78,"category":79,"image":80},"\u002Fblog\u002Fibm-watson-studio-intro","IBM Watson Studio Intro for Python Programmers","2023-03-17","Machine Learning","\u002Fimages\u002Fblog\u002Fibm-watson-studio-intro.jpg",1792603211412]