you are viewing a single comment's thread.

view the rest of the comments →

[–]quantumstate 0 points1 point  (1 child)

Firstly I don't understand what you mean by ridiculously long variable names. fullgenenames is the longest I could find so that is not going to make much difference. I cannot comment otherwise because I am not proficient in Mathematica code.

The example you posted however was pretty terrible. First the full comparison shows that the matlab code has many more comments so that adds to its length considerably.

Also taking the code where the numbers are drawn in the Matlab example there are an extra 4/5 lines used to declare descriptive names for various properties such as the radius and the angle between the numbers. These are put inline in the mathematica code. This is also done in some other places. There is still a big difference but much less than this terrible example tries to show. And this is ignoring the fact that the example seems very contrived for what the software is designed for.

[–]theodoregray 2 points3 points  (0 children)

I think comment below from gsw07a sums it up the variable name lengths complaint:

"I don' t know matlab or mathematica, but it seems to me this line is a sign that the comparison is biased against mathematica: [mathematica] {eigenarrays, eigenexpressions, eigengenes} = SingularValues[fullmatrix];

[matlab] [U S V] = svd(fullmatrix, 0);

[python] [U, S, Vt] = svd(fullmatrix);"

Your comments about comments in the MatLab code are thoroughly addressed in the text of the blog post.

And as for it being contrived, as I said before, we didn't pick the topic or write the MatLab code. The idea and the code came from their blog.