Questions tagged [code-organization]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5 votes
1 answer
299 views

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 ...
user avatar
2 votes
2 answers
263 views

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 ...
user avatar
  • 1,047
0 votes
1 answer
59 views

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). ...
user avatar
3 votes
1 answer
90 views

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 ...
user avatar
8 votes
0 answers
84 views

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. ...
user avatar
  • 30.3k
0 votes
1 answer
56 views

Plotting functions with many variables - organization [duplicate]

Consider ...
user avatar
0 votes
0 answers
49 views

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. ...
user avatar
1 vote
0 answers
53 views

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 ...
user avatar
  • 231
1 vote
1 answer
311 views

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

Say I indent my code like this: ...
user avatar
  • 11
5 votes
2 answers
207 views

Visually differentiating arguments of If

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

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 ...
user avatar
  • 11
0 votes
0 answers
66 views

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....
user avatar
  • 3,720
5 votes
1 answer
1k views

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 ...
user avatar
  • 25.3k
27 votes
2 answers
3k views

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 ...
user avatar
73 votes
4 answers
6k views

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 ...
user avatar