Skip to main content

Questions tagged [broken-code]

Use this tag only if you did your research and you still don't know why your syntactically correct code does not work.

Filter by
Sorted by
Tagged with
6 votes
3 answers
511 views

I was using ContainsAny in the Select function when I noticed that some of the relevant records in my dataset were missing. ...
Joseph Chemaly's user avatar
0 votes
0 answers
83 views

I'd like to use the ResNet V2 on my own data, but my data is not image. Let's say my data is a list of numbers or a time sequence. Therefore, I decided to revise the ResNet V2 a little bit. ...
BirdStrike1113's user avatar
1 vote
0 answers
110 views

I am working on research article with link https://www.sciencedirect.com/science/article/abs/pii/S0378475421004560 It contains dimensionless non-linear equations mentioned in article. I am writing the ...
Noor Aslam's user avatar
1 vote
1 answer
148 views

This code works well to generate first order solution but gives recursion error on generating second order solution. I think the error is causing due to computation of $f$ but don't know how to fix it....
Noor Aslam's user avatar
2 votes
2 answers
121 views

I have two notebook codes 'calculation.nb' and 'caller.nb'. The first code simply generates and prints a random number. The second code I want to use to call the first code a set number of times (say ...
John Doe's user avatar
  • 291
1 vote
0 answers
71 views

why the behavour of nlmf["ParameterTable"] has been changed from 14.0 to 14.1? After a run of ...
Teodoro Marinucci's user avatar
1 vote
3 answers
180 views

I have the following situation. I will first post the code and then explain what I'm trying to do and what is going wrong ...
user1620696's user avatar
1 vote
0 answers
75 views

I am categorizing a very large set of indexed strings that, due to size and complexity, takes long enough to desire to execute this via parallelization. The below is a simplification, not ...
Alexander B.'s user avatar
  • 1,896
1 vote
2 answers
246 views

Suppose we want to compute the following limit: \begin{equation} \lim_{\varepsilon\to 0}\lim_{r\to\infty}\frac{\lfloor 1.0101\left(\lceil 6r^2 \pi/{\varepsilon}\rceil-1\right)+1\rfloor}{ \lceil 6r^2 \...
Arbuja's user avatar
  • 81
3 votes
2 answers
352 views

This is slightly different from this and this question. We are focusing on an illustration of all pathways from a specific sample. Suppose we have the following sample: $$\small{\mathcal{S}=\left\{(-1....
Arbuja's user avatar
  • 81
0 votes
1 answer
133 views

This is slightly different from this question. We are focusing on finding all pathways of a sample rather than partitions of equal area: Suppose we have the following sample: $$\small{\mathcal{S}=\...
Arbuja's user avatar
  • 81
0 votes
0 answers
106 views

Here is my code. I tried all modifications to this code but I'm not able to resolve the problem. Can anyone tell me why am I getting this error? ...
user4381753's user avatar
0 votes
0 answers
146 views

The quantum physics problem I am looking at is a rotated qubit. The setup involves a y-rotated qubit measured in the z-basis (hence spin-up and spin-down). This scenario typically includes modeling ...
John Doe's user avatar
  • 291
1 vote
1 answer
174 views

For each $n\in\mathbb{N}$, how do we compute sets $A_n$ and $B_n$ below: Let $A_1=[0,2/3)$. Let $B_1=(2/3,1]$. If $A_n$ is a union of intervals, then for each interval cut out the middle $1/2^{n+1}$ ...
Arbuja's user avatar
  • 81
0 votes
1 answer
141 views

I am given a list of matrices. At first order I want to evaluate the commutators and anti-commutators of all pairs in the list and return a new list that contains two lists: one containing all ...
JohnnyB's user avatar
  • 115
1 vote
0 answers
53 views

I want to calculate the derivative and find critical points of the following function: $\begin{equation} \frac{(w+w_s)(w^2+w_s^2)L^2C^3}{(wR^2C+(w^2 LC-1)^2)(w_s R^2C+(w_s^2 LC-1)^2)} \end{equation}$ ...
E. Ginzburg's user avatar
2 votes
1 answer
151 views

I need to show the energy level density around the local maximum of this double-well potential. I can do it using the following: ...
user444's user avatar
  • 2,836
8 votes
1 answer
333 views

Bug introduced in 13.2 or 13.3 and fixed in 14.1 Trying to generate a simple QR code with ← or U+2190. I got varying results: the same in Mathematica versions 12.3 and 13.1 but very different in ...
David Caliri's user avatar
0 votes
0 answers
145 views

I had Mathematica Version 12.3.1 Student Edition and Integrate and RUBI's Int functions produced the same answers for my purposes with good results. I updated my version to 13.3.0 Student Edition and ...
Tom00496's user avatar
2 votes
1 answer
249 views

I am trying to convert this Python code for Classical map of kicked top to Mathematica. For a single trajectory, I am able to ...
user444's user avatar
  • 2,836
0 votes
1 answer
272 views

Motivation: From this post we, initially, wanted to cover a rectangle using smaller, non-overlapping rectangles with the same area: the difference between the total area of the smaller rectangles and ...
Arbuja's user avatar
  • 81
1 vote
3 answers
148 views

Question: How do we label point coordinates in Pathgraph using VertexLabels. Suppose we have a list of points ...
Arbuja's user avatar
  • 81
0 votes
0 answers
99 views

I am doing a solved exercise shared here. However, while running the code, I encountered an error on page-8, under the Dynamics section. with error : I think this error is due to the absence of ...
user444's user avatar
  • 2,836
3 votes
2 answers
227 views

...
user444's user avatar
  • 2,836
0 votes
1 answer
128 views

Consider the following code: ...
John Taylor's user avatar
  • 6,063
5 votes
4 answers
402 views

How can I generate n-bit base-m Gray code in Mathematica, where only 1 bit changes at a time and all possibilities are covered? I have been hitting my head against a metaphorical wall for a few hours ...
More Senne's user avatar
3 votes
2 answers
197 views

I am very confused and even restarted Kernel several times (Mathematica 13.1 Windows 10). However, I fail to understand why one evaluation of NDSolve works while a ...
Ali Hashmi's user avatar
  • 9,130
1 vote
3 answers
396 views

Suppose we want an interactive plot for the code: ...
Arbuja's user avatar
  • 81
21 votes
4 answers
1k views

About 9 years ago, I came across this interesting website, and found the following paragraph with a broken Mathematica code sample: When fluid passes an object, it can leave a trail of vortices called ...
xzczd's user avatar
  • 71.6k
4 votes
1 answer
242 views

Using Version 13.1.0.0 (Edit: MacOS BigSur Version 11.6, Hardware M1 chip) In order to show some Log (or LogLog) plot features that I find annoying, here is some code: ...
Carl's user avatar
  • 893
1 vote
0 answers
45 views

I'm trying to make something like this work: Evaluating someData // Query[whatever...] /* summarizeInPrettyWay /* promptToRemoveCompoundExpression ; should produce ...
joka's user avatar
  • 342
2 votes
1 answer
406 views

I'm interested in carrying out stability analysis on discrete dynamic systems, as was done in this paper. The Author used their function ...
zeraoulia rafik's user avatar
4 votes
2 answers
254 views

I've tracked a bug in my code down to the problem of adding two numbers together, with the left argument having machine precision, e.g by 3` . The issue is, if ...
shanedrum's user avatar
  • 587
0 votes
0 answers
107 views

Suppose I have two sets $F_{1,n}$ and $F_{2,n}$ written as: ...
Arbuja's user avatar
  • 81
0 votes
0 answers
61 views

I have a problem where if I multiply two variables a c in Mathematica, then copy as LaTeX (or just use the Mathematica output) to get a c, then put it in ToExpression["a c",TeXForm], I get ...
Tom00496's user avatar
5 votes
1 answer
201 views

Consider the following toy code: ...
John Taylor's user avatar
  • 6,063
1 vote
1 answer
167 views

Suppose we have the following: ...
Arbuja's user avatar
  • 81
1 vote
0 answers
185 views

I have a problem with Mathematica when trying to glue two tables together. The tables have the form ...
John Taylor's user avatar
  • 6,063
2 votes
1 answer
166 views

I am looking to output the probability of n classic six-sided dice but I am not sure how to go about starting. This is what I have written out so far, but no way to go about accounting for n dice for ...
Brandon Evans's user avatar
1 vote
0 answers
77 views

In the note RootSearch problem when called from within ParallelDo I described the problem with Ted Ersek's RootSearch package and came to the conclusion that it is ...
Igor Kotelnikov's user avatar
1 vote
0 answers
185 views

I have been using Ted Ersek's RootSearch package for Wolfram Mathematica for many years. The package worked great, including inside the ...
Igor Kotelnikov's user avatar
4 votes
2 answers
690 views

How can I implement this pseudocode in Mathematica? Algorithm: ...
Birgitt's user avatar
  • 267
0 votes
0 answers
89 views

I need to define a table where the definition of the elements differs if the indices $i$ and $j$ are equal or different. In particular I have to implement the following formula $$(K_1^{(1)}(m_1,m_2))_{...
Quiver's user avatar
  • 115
0 votes
1 answer
119 views

The function initDataTable simply reset all data to Black first, then set the bottom right quarter to ...
Chris Guo's user avatar
  • 309
0 votes
0 answers
125 views

I have the following code which sets up a Reduce function call: ...
Blitzkrieg555's user avatar
0 votes
1 answer
113 views

I tried using DeleteCases to delete elements in r1 where g2==0 to get a defined arithmetic ...
Arbuja's user avatar
  • 81
0 votes
1 answer
98 views

I tried computing the following ...
Arbuja's user avatar
  • 81
2 votes
1 answer
182 views

I have an assignment in Mathematica, which I've already solved using Python and it's a bit hard to convert the code. Here's what I have done so far: ...
mandella's user avatar
  • 143
0 votes
0 answers
72 views

I don’t know what is wrong with my code. I am trying to create 2-D or 3-D curves to simulate something like the SIR model, but with tumor growth instead. It is a proliferation-invasion/ reaction-...
user79647's user avatar
2 votes
0 answers
66 views

When I run the below ParallelTry command, it just sits on it and says its being evaluated, but I cant abort it, it doesn't return what I am expecting, and I have to ...
shanedrum's user avatar
  • 587