# Tagged Questions

Questions on writing non-trivial programs in Mathematica. Do not use this tag for questions on plotting/graphics or for questions on doing mathematics with Mathematica, where the focus is more on the math than the program.

256 views

### Help with Permutations

I am currently trying to generate a list of permutations of length 2 of elements of a list of strings. For example: ...
32 views

### Key mapping an association applied to a distribution

I am attempting to import data from a database, group it according to a given identification parameter, get it's statistically relevant information, and then export it as a JSON object for ...
38 views

### How to add new formula in existing formula in certain time?

Good day, May anyone help me to give an idea to edit the coding For as below towards my problems. β1 = 0; β3 = 0; β2 = Pi/2; For[t = 0, t < 30, t++, A = {{E^(Iβ1 + Iβ3)Cos[tβ2], E^(Iβ1 - I\β3)...
5 views

### Formula for the area of a trapezoid when only points are known [migrated]

I am making a personal website and the main menu consists of scaled trapezoids. I can find the coordinates of the points for each trapezoid, and I know the parallel edges. I need a formula that can be ...
2k views

### Programming the fiver game

Obviously, even if I ask a lot of question I am, obviously, still a dummy!!!! I want to program the fiver game. It's a very simple game played solitary on a $5 \times 5$ the rule is elementary : if ...
3k views

### What is a Mathematica packed array?

A simple sounding question with a few sub questions: What is the difference between unpacked vs packed array? Are packed arrays more space efficent, how much so? Are packed arrays more time ...
6 views

Why I can not get a result of 2 while giving input of 2.2 as a float. With logic that 2.2 gets converted to 220, than when it goes through the first for loop I am going to get a remainder of 20(which ...
5k views

### What does the construct f[x_] := f[x] = … mean?

This question mentions "x := x = trickery". What does defining a function as f[x_] := f[x] = ... do and what is it good for?
4k views

### How do I increase the readability of this code?

Below is some code I am working on; being a beginner. How can I increase the readability of the part behind Manipulate? I can't read my own code anymore, because it is simply too long and unordered. ...
3k views

### Flatten command: matrix as second argument

One thing I could never wrap my head around is how Flatten works when provided with a matrix as the second argument, and the Mathematica help isn't particularly ...
380 views

162 views

### How to optimize my own BezierFunction?

A few months ago, I asked a question about the implementation of Bezier surface. Please see here for a full detail. I also know that BezierFunction[] is built-in ...
76 views

### Finding and plotting a parametric solution to a complicated equation (transcendental, log-polynomial)

I am trying (desperately) to find a way to solve a transcendental equation whose solution $x$ depends on non-numerical parameters $a$ and $b$. And then to produce a ...
613 views

### Is the renaming mechanism of With flawed?

I'm confused about the renaming mechanism of With: ...
211 views

### Mathematica implementation of Zeilberger's algorithm (previously done in Maple)

I have this Mathematica code: ...
107 views

### Speeding iterative computation

I want to get the following iterative sequence ...
565 views

### How to debug the C code for LibraryLink?

Recently, I use the C to rewrite a Mathematica function NonzeroBasis[], please see here for fully descriptions. Here, ...
230 views

### Random walk on a Sierpinski gasket

I am trying to simulate a random walk on a Sierpinski gasket. The best strategy i could come up with is to use Nearest point function to determine the next possible step of my walker. But this creates ...
378 views

### Tips to move from functional programming to GUI-based applications

Even though this forum has some questions related to Mathematica programming tips I think that we still don't have specific help for those who want to learn to efficiently create GUIs in Mathematica. ...
93 views

### Saving the values calculated in a list or a table

I cannot realise if it is a duplicate question. Sorry; if it is. This ...
102 views

### How does a construct like i : func[arg_] := i = an expression using arg work? [duplicate]

Occasionally I run into a Pattern that looks like i:func[arg_]:=i= an expression using arg I have two questions on this: Can ...
1k views

### Schedule programing problem with integer linear programming

I know how to model this question on paper, but I don't know how doing it in Mathematica. Imagine , there is a university student who want to choose courses for this semester and he got the ...
97k views

### Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
5k views

### Creating custom functions with multiple arguments

I am hoping that this isn't a stupid question so feel free to vote it for closure. Google failed somehow. I want to define a custom function (more complicated than the usual ...
70 views

### A problem with the output

i using mathmatica to study lagrange Interpolating,however i couldn't make the output as I want I wrote both who is the output and how i needed ...
125 views

### How to connect some separate components with shortest total length line

Maybe this post too hard.So I try to make a simple version to research. Simulating a simple graph than that post. ...
193 views

### How to check and reset the boolean value of many options one times?

I defined a function which owns many options. In addtion, these options have a common characteristic. Namely, only accepting boolean value True or ...
69 views

### generating random algebraic matrix using elementary operations

I generate several algebraic matrices of 12x12 where each element is a combination no repeat of the variables x, y, z and operations +, -, *, /, power, establishment (square root), any of them or any ...
48 views

### Where can I find tutorials or examples about Internal packages and other useful packages? [duplicate]

As an intermediate level Mathematica user, I consider one of the greatest barrier on my way to a higher level of programming is the lack of knowledge about extra packages like Internal package or ...
36 views

### How Defer[1+Evaluate[1+1] work?

I want to generate some expressions. The expression is not evaluated expect some parts will evaluate first. A simple example is Defer[1+1+1] and in this expression ...
97 views

### How to overload the operator “*” as KroneckerProduct [closed]

Can I use the expression below a * b * c * d for short to instead KroneckerProduct[a,b,c,d] automatically when a,b,c,d are ...
71 views

### What options for project development exist if the Cloud and Mathematica Online cannot be used

Due to contractual obligations to protect IP and client information, we unfortunately, cannot use Cloud or Mathematica Online for development in the development of our projects. We are further ...
73 views

### Develop a loop with two counters [closed]

Description: I am trying to develop a function that would take two arguments n and m and would run another function multiple ...
261 views

### How to program a click panel for chemical elements (like a periodic table)?

The command ColorData["Atoms", "Panel"] indicates RGBColors of atoms by clicking a panel. As I don't want to reinvent the ...