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.

0 votes
0 answers
41 views

Why am I getting this error? Set::setraw: Cannot assign to raw object 73

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
89 views

SoftmaxLayer with one-hot vectors

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
  • 271
1 vote
1 answer
89 views

Most efficient way of defining the following sets for every step $n$

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
64 views

Generate all commutators and anti-commutators up to a certain order of a list of matrices

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
36 views

Define a function using symbolic constants [closed]

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
88 views

Alternative Representation for Energy Levels and Energy Level Density

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,644
8 votes
1 answer
251 views

Unicode symbols not encoded properly in BarcodeImage[] in Mathematica 13.3

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 version 13.3. Mathematica 13.3 was updated to ...
David Caliri's user avatar
0 votes
0 answers
111 views

Integrate function differing from RUBI's Int function in version 13.3.0

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
197 views

Python Code to Mathematica for Classical Map of Kicked Top

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,644
0 votes
1 answer
197 views

Fixing a code which covers $[-k,k]\times[-k,k]$ for a given $k\in\mathbb{N}$, with smaller rectangles of equal area?

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
84 views

Labeling point coordinates in path graph using VertexLabels

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
54 views

Part specification error

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,644
3 votes
2 answers
176 views

Colouring stacked 2D in 3D

...
user444's user avatar
  • 2,644
0 votes
1 answer
62 views

Why does the following code not change the table?

Consider the following code: ...
John Taylor's user avatar
  • 5,887
5 votes
4 answers
301 views

Efficient generation of n-bit base-m Gray code with adjacent bit changes

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

15 30 50 per page
1
2 3 4 5
8