In Defense of Matlab Code
runmat.org
In Defense of Matlab Code
1–10 of 174 posts
Re: In Defense of Matlab Code
#2Earlier in my career, I found that my employers would often not buy Matlab licenses, or would make everyone share even when it was a resource needed daily by everyone. Not having access to the closed-source, proprietary tool hurt my ability to be effective. So I started doing my "whiteboard coding" in Julia and still do.
Re: In Defense of Matlab Code
#3> # or rely on broadcasting rules carefully.
> Z = Y @ X.reshape(3, 1)
Why not use X.transpose()?
Re: In Defense of Matlab Code
#4RunMat is an interesting idea, but a lot of MATLAB's utility comes from the toolboxes, and unless RunMat supports every single toolbox I need, I'm going to be reaching for that expensive MATLAB license over and over again.
Re: In Defense of Matlab Code
#5Re: In Defense of Matlab Code
#6> # We must reshape X to be a column vector (3,1) > # or rely on broadcasting rules carefully. > Z = Y @ X.reshape(3, 1) Why not use X.transpose()?
Re: In Defense of Matlab Code
#7There's also Julia. Earlier in my career, I found that my employers would often not buy Matlab licenses, or would make everyone share even when it was a resource needed daily by everyone. Not having access to the closed-source, proprietary tool hurt my ability to be effective. So I started doing my "whiteboard coding" in Julia and still do.
It also removes many of Matlab's footguns like `[1,2,3] + [4;5;6]`, or also `diag(rand(m,n))` doing two different things depending on whether m or n are 1.
Re: In Defense of Matlab Code
#8Re: In Defense of Matlab Code
#9> # We must reshape X to be a column vector (3,1) > # or rely on broadcasting rules carefully. > Z = Y @ X.reshape(3, 1) Why not use X.transpose()?
Re: In Defense of Matlab Code
#10> # We must reshape X to be a column vector (3,1) > # or rely on broadcasting rules carefully. > Z = Y @ X.reshape(3, 1) Why not use X.transpose()?
It's because in Python 1-dimensional arrays are actually a thing, unlike in Matlab. That line of code is a non-example; it is easier to make it work in Python than in Matlab.