# Questions tagged [code-generation]

The tag has no usage guidance.

91 questions
Filter by
Sorted by
Tagged with
33 views

### Mathematica call CompiledFunction from Python with Listable and Parrallelization attributes

I have a CompiledFunction e.g. this: ...
• 31
1 vote
28 views

### Generator of limits of successions according to type of indeterminacy. Correct syntax

I am trying to make a limit generator with 3 columns, number of the exercise, the second column is the limit (perfectly written with n-->00), and the third column is the result of the limit. I have ...
• 11
1 vote
81 views

### How can I write the code for an inverse integral transform?

How can I code any type of integral transform with its inverse integral transform in Mathematica which gives the correct results and properties? Below is the example for Elzaki transform: ...
116 views

• 2,001
560 views

### NDSolveValue solutions differ based on number of equations

Short version: Do the methods (or other things the function uses to solve the equations like time steps or error estimates) that NDSolveValue uses by default depend on the types and quantity of ...
• 1,124
2k views

### Making a table of solutions from NSolve or Solve

How can I generate a table of solutions to an equation such as this: Solve[{a^m+b==c,b-m==a+Sqrt[n]},{a,b}] for some given values for $n$ and $m$.
• 2,001
82 views

### How generalizes (automate) recursive code

This is a small version of my code (for n=2): ...
• 578
851 views

### How can I automatically generate usage messages?

When programming, I try and name my functions and arguments clearly and document them with usage:: so I can keep track of everything; e.g., ...
• 679
126 views

### Optimizing an expression – find identical subexpressions and substitute them

I'd like to simplify a complex symbolic expression expr by substituting and listing subexpressions that appear more than once in ...
• 215
1 vote
58 views

### SymbolicC namespace?

What is the equivalent for C++'s using namespace ...; in SymbolicC package of mathematica and are there any good resources like ...
• 9,443
191 views

### Should I implement an iteration with a While-loop? [closed]

I have written a code that uses a guessed eigenvector (avecs) to construct a Hamiltonian (my hamiltonian depends on its own eigenvectors, so I can not solve it directly and I need to use iteration (...
110 views

### How to create a file that runs without displaying the code (similar to an .exe)

I am writting a code that could be useful for some people. The program will be free but I would like to protect the code. As I am not good at explaining myself I will simply illustrate my question ...
117 views

### Help with NDSolve for system of odes [closed]

Can someone please tell me what I am doing wrong? I am trying to solve a system of odes using NDSolve. The code I have written is as follows: ...
107 views

### Division sieve operations in Mathematica

I am just wondering how to easily compute this problem using Mathematica. What Percent of Even Integers are Divisible by either 6, 20, 28 or 70? My purpose is to extend this to a finite number of ...
• 189
872 views

### Write Power in CForm[] as multiplication instead

Is there a simple way to make Mathematica write CForm[p^2] not as Power[p,2] but rather as ...
• 1,319
224 views

### Bug: Library functions from older versions of Mathematica may crash in Mathematica 11.1 and conversely

The following is a confirmed bug [CASE:3846875] that turned up in the prerelease 11.1.0 and is not solved in the official release. This is a small example. Execute the following commands in ...
• 10.2k
57 views

### SymbolicC: Is there a CChar, i.e. a way to generate a single character constant?

I am aware of CConstant and CString, but neither can output the single-char literal 'a'
• 5,739
159 views

### Applying a function for several sets of input [duplicate]

I'm trying to understand the Wolfram language and copied some examples from the documentation into a workbook and then tried to work through examples of my own. I'm attempting to evaluate a function ...
1 vote
123 views

### What Does Slot Mean In Root Output and How To Translate It To Code? [duplicate]

I have the notebook below which produces the correct numerical output but the CForm function doesn't appear as though it is working correctly (or I don't know how ...
• 111
621 views

### Metaprogramming: creating compiled functions from inter-dependent code blocks

I want to create a compiled function from inter-dependent code blocks. Here is a minimal example showing the salient features based on strings: ...
• 777
583 views

### Christmas fun with Mathematica [closed]

In a previous post we saw how we can create animated snowfall. So, I was wandering what else, related to Christmas, we can do with Mathematica? Perhaps, drawing a tree full of ornaments and lights... ...
• 8,790
1 vote
482 views

### Writing text inside Venn Diagrams

I found this question which is extremely cool and amazing How to plot Venn diagrams with Mathematica? which also helped me in plotting and creating Venn Diagrams. But there is something that is ...
• 961