Questions tagged [code-organization]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
1 answer

How to merge multiple .nb files into one notebook in mathematica

I have 10 different notebook files which I want to combine into a single .nb file. I know I can copy-paste all the cells of those 10 files to a new notebook window and then save it as nb. I can do so ...
Aman Kushwaha's user avatar
3 votes
2 answers

The best way to organize or arrange a large code

I have a .nb file including several large parts so that finding something in it and even seeing whole is difficult. I think it is better to put a "table of content" in start of the file and ...
Wisdom's user avatar
  • 1,258
0 votes
1 answer

Using and Naming different sets of data in a manipulated chart/plot

I am trying to visualize advertisement data from amazon which is comprised of a dozen or so campaigns, each of which has three subgroups and each subgroup has its own performance data (metrics). ...
Thomas Hoke's user avatar
3 votes
1 answer

Dividing a long code into parts

I have long code that I would like to divide in several parts (for readability) to be saved in different files. Then, later, I could use those parts into a different notebook. The parts I am thinking ...
Patricio's user avatar
8 votes
0 answers

Design Patterns for System Functions?

Using PrintDefinitions give one a great view into many system functions. Often the design of these symbols incorporate multiple patterns that I see again and again. ...
M.R.'s user avatar
  • 31.4k
0 votes
1 answer

Plotting functions with many variables - organization [duplicate]

Consider ...
Jagerber48's user avatar
0 votes
0 answers

Deleting variable assignments in a sub-notebook which is called from my main notebook

I have two notebooks; one main notebook which calls another notebook several times in a loop. I want to delete the assignments of variables in the sub-notebook which is called from the main one. ...
ahmethasim's user avatar
1 vote
0 answers

Mathematica Workflow [duplicate]

What methods/tools/tips have you found that dramatically improved your Mathematica workflow? I have a love/hate relationship with Mathematica. It is useful no doubt, but defies my intuition at every ...
anon01's user avatar
  • 231
1 vote
1 answer

How can I copy and paste my beautifully indented code into my notebook without alteration?

Say I indent my code like this: ...
Sam's user avatar
  • 11
5 votes
2 answers

Visually differentiating arguments of If

Is there a convention for writing If expressions to visually differentiate between the different arguments? For example: ...
Daniel's user avatar
  • 825
1 vote
1 answer

GUI->Text code conversion

I have to solve about 30 symbolic equations simultaneously. Mathematica is taking more than 24 hours to solve it on a 6 core system and now I have to run that on a cluster. In order to do so I need to ...
Qwerty's user avatar
  • 11
0 votes
0 answers

How to syntax highlight a code cell in another language? [duplicate]

I'm learning c/c++/objective-c and I wanted to write my notes in a mathematica notebook. But without the proper syntax color highlighting it looks terrible....
user5601's user avatar
  • 3,613
5 votes
1 answer

Interrupting package evaluation, handling error

I have some packages/scripts that I schedule the execution using Jobs in SQL server. For example, in some of then, I use to create reports and delivery by mail using Mathematica. All done using ...
Murta's user avatar
  • 26.2k
27 votes
2 answers

How can I get Mathematica to produce better Fortran code?

I am new to Mathematica and I am trying to get to it to produce some expressions in Fortran code. However, it seems that Mathematica will output duplicated expressions, that is, expressions the need ...
Tang Laoya's user avatar
77 votes
4 answers

Once more on object orientation in Mathematica: does it have to be so hard?

Recently I came across a set of problems which would be solved most easily within an object-oriented approach. I first attempted to solve them by other means, but found the complexity of the code ...
Leonid Shifrin's user avatar