All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

Long Execution time of Reduce

I have a set of linear homogeneous equations with 8580 variables. I want to estimate the time Mathematica takes to solve the system, by solving smaller sets of ...
2
votes
0answers
8 views

Use of Mathematica for Machine Learning Course

I am interested in others' experience using Mathematica for machine learning and bioinformatics course curricula. Let me first say that I have been programming with MMA for almost 10 years now (out ...
1
vote
0answers
10 views

Import data from a current web session?

Consider opening a web session such as (Mathematica 11.3) session = StartExternalSession["WebDriver-Chrome"]; ffoxdo[cmd_] := ExternalEvaluate[session, cmd]; ...
0
votes
1answer
11 views

How can I get paired coordinates from the implicite function?

I have equation E^y = x. How can I use Mathematica to solve all of "y" from the desired "x" value. For example, I want to solve for "y" from x = 0.5 , 1 , 1.5 , 2 , .... , 9.5 , 10. The solution ...
2
votes
0answers
15 views

How does Mathematica Find Integer Roots?

I have these two equations: $$f(x)=(\cos(\frac{n}{x} \pi)\cos(x\pi))-1$$ and $$g(x)=\sin^2(\frac{n}{x}\pi)+\sin^2(x \pi)$$ where $n$ can be any integer. These two functions are what mathematicians ...
0
votes
0answers
11 views

Solving Inequalities: Run time too long

I am trying to solve the following system for d: ...
3
votes
1answer
26 views

How to plot a crossection of a ParametricPlot3D?

I'm plotting a surface using ParametricPlot3D. Ideally I would like to plot an intersection of the surface with a plane just as seen in another question (Cross Sections or slices of 3d figures - ...
1
vote
1answer
27 views

Solve coupled PDEs: boundary conditions problem

I need to solve 4 coupled PDEs. Thanks to @xzczd's help, a few days ago I can obtain the solution of the first 2 equations with some proper boundary conditions, see this post. Now, these two equations ...
1
vote
1answer
40 views

The vectorfield for nonauntonomous system?

The model is a nonautonomous system $x'=(2+cos(2 π t))x -0.5 x^2-0.5$ and it can be transformed to the autonomous form by ...
0
votes
1answer
40 views

NDSolve for f[t,s], with initial condition f[s,s]==1

I try to solve integro-differential equation for a function of two variables, where the initial conditions are given with f[s,s]==1. Mathematica does not like such an initial condition, as I get an ...
0
votes
1answer
19 views

Error with StateSpaceTransform: the rule based transformation must be of length 2

I would like to perform a change of variables on the following dynamics system: ...
0
votes
3answers
46 views

How to simplify a three variables expression with Simplify?

I want to calculate the value of $\nabla\cdot\frac{1}{(x^2+y^2+z^2)^{1.5}}(x\hat{x}+y\hat{y}+z\hat{z})$. I used the following syntax: ...
-1
votes
0answers
33 views

Why Are Centroid Calculations with Line Integral Wrong?

everyone. I'm currently trying to calculate the centroids of objects using parametric equations and line integrals. I already have a program that can parametrize any shape accurately with a closed ...
3
votes
0answers
43 views

Steiner Tree Approximation

I am wondering about the existence of Mathematica code to find (approximate) Steiner trees in graphs. I know there are a number of algorithms to do so --- just curious if anyone has implemented any ...
2
votes
1answer
25 views

Identify the location of the last entry with a particular value in a list

I have a long list (Table) consisting of "True"s and "False"s. I would like to identify the position in the list of the last entry that takes the value "False". Is there a way to do this?
2
votes
1answer
114 views

Plot the solution from DSolve

I'm trying to solve a differential equation as in the following code: FullSimplify[DSolve[x'[t] == a + b E^(g t) + (c + d E^(-g t)) x[t], x[t], t]] which ...
2
votes
1answer
45 views

DSolve yields a strange character K[1]

I'm trying to solve a linear differential equation as in the following code: DSolve[x'[t] == a + b E^(g t) + (c + d E^(-g t)) x[t], x[t], t] which yields ...
0
votes
0answers
19 views

TargetUnits aren't working as expected on an InterpolatingFunction

Short version: My understanding of the use of TargetUnits in a Plot statement is that if the function being plotted has units, MMA will attempt to convert the output of that function to the unit form ...
-1
votes
1answer
78 views

Fourier Collocation For Heat Equation

Given that $$\frac{\partial u}{\partial t}=\nu\Bigl(\frac{\partial^2u}{\partial x^2}+\frac{\partial^2u}{\partial y^2}\Bigr)$$ With the following periodic boundary conditions: $$u(-\pi,y,t)=u(\pi,y,t) \...
0
votes
1answer
47 views

Taking the largest 10 items of a dataset?

With a dataset like: How can one take the top 10 items (largest by FileSize in this case)?
3
votes
2answers
147 views

Does Mathematica 12 support GT 730 CUDA?

I am getting the following error when I set the target device as GPU: NetTrain::trgdevegpu: TargetDevice -> GPU could not be used; a supported NVIDIA GPU was not found. If you are using an ...
3
votes
1answer
39 views

Exporting image and scale

Let us say I have a plot, for example that one: Plot[x^2,{x,0,5},AspectRatio->5] and I would like to export it as a PDF in such a way that if I print the PDF ...
3
votes
0answers
61 views

How to use an interpolating function as an intial condition for a PDE?

I want to be able to approximate a PDE, but my eigenfunction is an Interpolating function. Is there a way I can use an interpolating function as an initial condition in the PDE. For Example: ...
2
votes
1answer
72 views

Most efficient code for a recursion relation

What is the most efficient code for the following formula: $y_{n+1}=\frac {2y_n-y_{n-1}+5g_n y_n+g_{n-1}y_{n-1}}{1-g_{n+1}}$ where $g_n$ is a variable. I have tried this code ...
4
votes
0answers
48 views

Gradient of neural network output with respect to input

Context: I'm studying adversarial attacks on neural networks. These attacks are grouped into targeted, where a legitimate input is changed by some imperceptible amount and the new input is miss-...
3
votes
2answers
99 views

Plotting maxima within a simplex

I am trying to draw a particular maximum plot within a simplex. I have functions based on two variables: Write p,q for the two variables where p,q \geq 0 and p + q \leq 1. This defines the simplex ...
1
vote
0answers
30 views

Compile error: clang: error: linker command failed with exit code 1

After not using Mathematica 10.0.2.0 for a few months (I think since december 2018) on my MacBook Pro from 2013 (now with macOS Mojave 10.14.5) I am suddenly facing issues with ...
0
votes
0answers
34 views

Define a function with several arguments with the if command

Hey can anyone tell me why this function isn`t working. ...
0
votes
0answers
46 views

Dynamic Updating Annoyance

I want to use the following grid of Dynamic variables to set values for evaluations of expressions containing those variables. ...
1
vote
1answer
23 views

Vector shape and Dimensions

I think I have not understood clearly the difference between dimension and shape. I want to construct a vector remembering recurrence of the type : ...
0
votes
0answers
27 views

How to export the following table?

Consider a table ...
4
votes
2answers
75 views

Using NDSolve on wave PDE on string, when solution given at 2 different times instead of initial velocity?

This is a PDE taken from a Maple document. Mathematica DSolve currently unable to solve it. I wanted to verify Maple solution using NDSolve. This is string of length 1, fixed on the left, and free ...
2
votes
1answer
74 views

How to compile or speed up a function with eigensystem?

I have defined two functions as following: ...
0
votes
1answer
34 views

Generalize polynomial coefficients from multiple equations

I have following equations: $$\frac{1}{((a_1 - 1) f + 1)} + \frac{1}{((a_2 - 1) f + 1)} -k = 0$$ $$\frac{1}{((a_1 - 1) f + 1)} + \frac{1}{((a_1 - 1) f + 1)} + ... + \frac{1}{((a_n - 1) f + 1)} -k = 0$...
4
votes
4answers
183 views

How to use AppendTo in a While loop?

I am trying to code a while loop that uses AppendTo to append the loop variable to an empty list. ...
3
votes
0answers
42 views

Pattern matcher behavior change in 11.3

When trying to switch from version 10.3 to 11.3 I noticed that some of my code do not work properly. After some investigation I found that the problem is with pattern matcher. Here is the example: <...
1
vote
0answers
39 views

Solving for a function?

I am trying to find an ‘elegant’ manner of expressing the need to solve equations of the form f[f[n]]=-n. I’ve been tackling this as a power series expansion but I ...
2
votes
2answers
60 views

Check if a list consists of numbers

I'd like to check if all elements of a list are numbers. I've tried ...
0
votes
0answers
14 views

Which groups exactly include the class “ComputedFiniteGroup”?

Which groups exactly include the class "ComputedFiniteGroup" ? Help says "A finite group derived by computation", but it's not very specific. Moreover, the examples given in the help mostly show ...
0
votes
1answer
52 views

How to carry a matrix in algebric form under “set delayed”

I have a small query and a related problem regarding the working methodology of Mathematica under set delayed/Do functions. Here is a simplified version of my problem. ...
-1
votes
0answers
27 views

Probability for k events in an arbitrary time step, while no events before [on hold]

I want to compute the following probability. Assume that we have a Poisson distribution $P(k,t)=\frac{(a(1-s)^t)^k}{k!}exp(-a(1-s)^t$ with mean $a(1-s)^t$. While $0 \le a \le0.5$ and $0\le s \le 1$ ...
1
vote
1answer
73 views

How to run C and Mathematica repeatedly?

I use a C program to generate a ".txt" file, and import this ".txt" file into Mathematica to do some calculations and export these calculations. Due to limitation of data size in C program, I have ...
0
votes
1answer
45 views

How to determine whether or not some integration is divergent using NIntegrate in Mathematica?

I am doing the following multi-dimensional integration using NIntegrate in Mathematica which is potentially divergent ...
3
votes
1answer
27 views

How to create a color code for points based on 3rd dimension with ListPlot or ListLogLogPlot

I have seen some similar posts but could not quite find what I am looking for. I would like to create a 2D plot with discrete points that are color coded by a 3rd dimension value. The color ...
5
votes
1answer
117 views

How to set Color range for ContourPlots?

I'd like to set the color range for a set of ContourPlots within a Table. Please notice that the colors in the uploaded picture aren't the same from one plot to the other, (take a look to the ...
5
votes
2answers
426 views

Why does Plot only sometimes use different colors for each curve [duplicate]

In this example Plot does not color each curve differently: Plot[{vx0 Sin[t], vy0 Cos[t]} /. {vy0 -> 1, vx0 -> 1}, {t, 0, 12}] but in this example it does: ...
3
votes
1answer
66 views

Sorting a list into “all possible ways” - sorting with incomplete information

Familiar example of sorting objects I have a list of $n$ "vectors" $\{x^{(1)},...,x^{(n)}\}$ of form $ x^{(i)}=\sum_{j=1}^m c_j^{(i)}x_j,i=1\dots n$, where $c_j^{(i)}$ are nonnegative ...
-1
votes
1answer
71 views

Wolfram Unable to Integrate [on hold]

I typed in a long integral into Wolfram Alpha and asked it to integrate it however Instead of showing the result or even that it is unable to perform the task it totally ignores the function and only ...
4
votes
1answer
66 views

How to iteratively build a list?

I have the following c++ code that I want to translate to Mathematica. ...
5
votes
1answer
71 views

Find position equal columns of matrix

Consider the following rectangular matrix M = {{1,1,1,1},{2,2,4,4},{3,3,5,5},{9,9,3,1}} I would like to extract the position of equal columns. Is there a simple ...

15 30 50 per page