All Questions

59,967 questions
39 views

Locate all row and column pairs containing a value in a table

I would like to find all row and column pairs that contain 1 in a table. For example, the row and column pairs that contain 1 in the table are (a,b),(b,a),(b,c),(c,b),(c,d),(d,c),(d,e),and (e,d). <...
55 views

How can I extract docs data from a WRI Workbench template?

I would like to move my docs out of Workbench in something simpler, but it's painful to imagine moving over all of the pages that I already have. DocuTools has lots of custom style names and has ...
48 views

Numerically solving a differential equation [closed]

Given the differential equation $𝑑𝑦/𝑑𝑥 − 4\sin(4/𝑥)\,𝑦/2 = 0$ and the intial condition $𝑦(−1.5) = 1$, solve it in the range {-1.5, 1.5}. a. Solve using Mathematica's own numerical ...
43 views

Passing a function into another function that integrates the 1st function [closed]

for example I have a = Sin[t] and then I have f[a_] := Integrate[a, {x, 0, pi}] Will it work? Will the ...
56 views

(2^n)+1 writing prime numbers in list format [closed]

1<=n<=1000 in the range of 2^n+1 prime values ​​that make the number of n Write the code that gives the prime numbers using the Do, For, or While commands. (Note: To test whether a number is a ...
90 views

Import every 50th record from a data file [on hold]

I want to import a really big data file which seems like it is too big for Mathematica. That's why I want to import the data in parts. For example, if I have 15,000 rows of data then I would read in ...
32 views

Is there a way to automatically use triangular elements in ToElementMesh [on hold]

I have some simple code to generate a mesh over a rectangle. ...
51 views

Can't get a good nonlinear model fit [closed]

I want to fit certain data that looks like this: data = {{0, -0.079}, {0.02, -0.083}, ..., {43.94, -0.025}, {43.96, -0.014}} but when I try to use ...
101 views

My question is similar to How to get the partial derivative of the inverse functions? But they are different. If we have a function $z=z(x,y)$, we can calculate the partial derivative $\left.\frac{\... 2answers 71 views How can I iterate across a list of triples? i just started to use Mathematica and I`m completely new to programming. So i'm some kind of noob in the purest form.. I'm trying to transform a coordinate system into a different one. I'm using <... 2answers 198 views Finding the path in a graph from A to B then back to A with a minimum of shared edges the problem is to find cycle from A to B back to A, so that the path B-A would use minimum edges from path A-B. The graph is undirected and can have cycles. The paths don't have to be shortest, they ... 0answers 27 views Simple solve of function yields different solution than tutorial [closed] I'm new to Mathematica and following some initial tutorials. When I replicate the exact code used in https://www.youtube.com/watch?v=O6h9_Xx-nLA (19:06), I however obtain different results. Here: <... 0answers 30 views Does CDFPlayerPro support evaluating code in a cluster? Just like the title says, does CDFPlayerPro support evaluating code in clusters? I have a model developed on a laptop using 11.3 which would benefit from a cluster, but rather than buying multiple ... 2answers 76 views How to construct and plot the following accumulated list? I have a list, say it is a = {1,3,3.2,3.9,4,4.4,4.9,5,7,8} To get the accumulate: acc = Accumlate[a] I want to plot the ... 0answers 29 views How to use the Mathematica [duplicate] I am a new learner for Mathematica. I know just some basics of Mathematica, I can plot simple graphs. But, sometimes I have to plot some complicated graphs. Then, I am unable to plot that particular ... 0answers 51 views Colors in contours When I want to draw a wide range of pictures,the value z=1 or z=-1 corresponds to plate patterns,I want it corresponds to one colour.This problem arises only when the scope of painting is ... 0answers 72 views How to get the executable out of a compiled function and run it in cmd Can someone please guide how to run the function compiled by Wolfram Language in cmd independent of the kernel. It seems to export it into ... 0answers 65 views NDSolve boundary condition relating derivatives in different variables [duplicate] I am trying to solve a wave equation (2nd order PDE) in z and t with absorbing boundary conditions, i.e. a boundary condition that relates the partial z and t derivatives. For this particular example,... 1answer 42 views Obtaining the vertex cosine similarity from a graph Given a set of edges, how can the adjacency matrix of these edges be populated with each vertex pair's cosine similarity measure? Consider this edge set: edges = {TX -> R1, R1 -> R3, R3 -> R5, R5 ->... 1answer 65 views Integral doesn't evaluate as it must be! [closed] i have this integral it must result in all constant values and the value of the integral its self which is Zeta[2/3] it can be done. ... 1answer 70 views Fractional motion and SystemException[“MemoryAllocationFailure”] ... 2answers 77 views Sub-subscripts in strings cause different spacings than subscripts Spacing around subscripts within strings seems to work well: But the spacing around sub-subscripts does not: I did not manually add that space after the 2. How can this be fixed? Thanks! 0answers 35 views Finite difference code is producing an error [closed] I used finite differences for mkdv equation but I get an error. how do I correct my code? ... 1answer 45 views Fixing different display colors within string My question below is my attempt to reduce a problem I am having to the simplest possible version that will show the error I am trying to fix. I recognize that the coding looks tortured, and I will ... 2answers 69 views Store Dynamic-accessible hidden metadata in a cell Is there a way to store metadata in a cell in such a way that it can be accessed with Dynamic? Think of e.g. how ExternalLanguage cells work. We can select whether ... 1answer 82 views How to safely forward/manage options between functions? Algorithms can often be splitted into smaller and reusable functions (that's a good thing). However with this scheme I am frequently facing "option forwarding problems". Imagine that you have 2 ... 0answers 31 views Use non-rule elements in multi-page form I am trying to figure out how to use non-rule elements to adjust the appearance in FormFunction[] while also using a multi-page form. I can use the following for ... 1answer 57 views Replace every n-th part of list [on hold] I have a list: b = ConstantArray[1, 50]; And I would like to replace every say 5th element with 2: I came up with: ... 0answers 24 views What's LinkObject error about, and what may have caused it? I've been running a simulation on a server, using parallezation, suddenly I got this error message: ... 1answer 47 views NonlinearModelFit of an NDSolve result I have some data : ... 0answers 42 views NDSolve and Quantity[] I'm working on a set of relatively basic ODEs of a physical pendulum and motor:$$\left\{\text{jb} \theta ''(t\text{s})+\text{rb} \theta '(t\text{s})+\alpha \sin (\theta (t\text{s}))+\mu \tan ^{-1}\... 1answer 87 views Importing and visualizing 4D data I am very, very new to Mathematica (I downloaded it 1 hour ago). I have a set of 1000 rows, 4 columns data, in a CSV file: data My first problem is that I don't know how to select the columns in the ... 0answers 59 views A way to calculate colour from wavelength? I'm trying to create a script taking my experimental values of measured radiance and turn it into xyz and rgb colour values. I import table with colour matching functions from here -http://cvrl.ucl.ac.... 3answers 165 views How to substitute curly brackets with round brackets in a grid of list I want to produce a table (or a grid) from my list of data, as follows: ... 1answer 56 views Gap Statistic Significance Testing with KMeans / KMedoids Relatively basic question here about FindClusters / ClusteringComponents. So I have noticed that Mathematica has an option for ... 1answer 385 views Pascal records and Mathematica programming Background: "experienced" Pascal-programmer (DOS-era, never got into OOP) proud owner of Mathematica ver 11.2 have used Mathematica for years to do my share of number crunching and plotting to ... 1answer 25 views How to export multiple column to excell from mathematica with each name at the sheet I have a generated a dataset, name TRES. Its a data between wavelength vs intensity for different time. time varies from 0 ns to 5ns with an interval of 0.1ns. So there is a 51 no of set, and I want ... 0answers 32 views How is the PowerSpectralDensity function implemented? [closed] I am working on a signal processing lecture for undergraduate students with Mathematica exercises/examples, and I would like to explain to them what happens when they run the ... 1answer 46 views RandomReal in combination with NormalDistribution [on hold] I am normally not working with Mathematica, but I have to understand a code written in i! Can some body say what the arguments and parameters of code below say? ... 1answer 2k views Why is this recursive code so slow? This code for the first five iterations the speed is okay, but after that the speed is very slow, I cannot understand what is wrong with this? Would you please help me fix it? ... 0answers 47 views How do I extract the value of a solution returned by Solve? [duplicate] For instance, I have an equation to be solved: Solve[c == 0, c] And of course, the result is {{c -> 0}}. What I need is ... 3answers 313 views Finding the area between two curves with Integrate I'm trying to solve and approximate the area between the two graphs. Right now, my functions are stored as f[x_] := 3 Sin[x] g[x_] := x - 1 and then I tried to ... 0answers 30 views Reading a chunk of data from a stream using Parallelization I am trying to read a stream and perform some operations in parallel. Here is the logic of the code inside the ParallelDo: 1- Open stream 2- Read chunk of data 3- Close stream 4- Process the data ... 1answer 35 views Trying to select nth elements from a list [closed] I'm trying to take the nth element of each sublist. Below is an example list: exlist = {{{1,2}, {2,6}, {4,1}}, {{2,3}, {3,1}, {2,4}}, {{5,6}, {7,5}, {6,7}}}; <... 0answers 19 views Gradient method in vectorfield on surface table does not work, module is slow For teaching purposes I want to generate a vectorfield on a surface an visualize the path of the gradient method. The surface and the gradient are generated by ... 1answer 79 views How to construct — based on physics-type notation — a magical simplex$\mathcal{W}\$ of bipartite qutrits?

I have a short Mathematica program: ...
118 views

Currents/voltages graph for an electrical circuit

I am trying to design the network graph for an electrical circuit. I have done this by hand so far. Here is the code for the voltages graph ...
59 views

I want to place the edges of a Hamiltonian cycle

I don't understand why, but the GraphLayout style "CircularEmbedding" doesn't place the vertices/edges of a Hamiltonian cycle on the circle. Is there any way I can ...