2.24 Thursday, June 18, 2020

2.24.1 Top new questions this week
2.24.2 Greatest hits from previous weeks
2.24.3 Can you answer these questions?

2.24.1 Top new questions this week

Find second largest elements in list
The performance of AceFEM in Intel Processor VS. AMD Processor
Rendering PNG images to spline curves
Parallel computing: cores vs threads
Convert ConvexHull to Inequality
Multi-variable Fixed Point Iteration Command?
Unimport wolfram language package

Find second largest elements in list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223907

Given a list:

lis = {37.21, 37.21, 37.2, 44, 44, 44, 101, 101} 
 
What is a simple way to extract the second largest elements? 
 
In[]:= someFunction[lis] 
 
Out[]= {44, 44, 44}

asked by Conor Cosnett https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36681 14 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 16 votes

The performance of AceFEM in Intel Processor VS. AMD Processor

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224062

I am going to buy a new powerful desktop that I will use to run finite element simulations using AceFEM. I found out that the new AMD Ryzen 9 3950X obtained more points in the CPU Passmark benchmark ...

asked by KratosMath https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=53039 8 votes

answered by marko https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=48938 8 votes

Rendering PNG images to spline curves

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223978

I found something interesting on this page (Generic contour smoothing with shading) that could help me improve my images. Unfortunately, they can only be used with graphics generated by the software ...

asked by LCarvalho https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=37895 8 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 9 votes

Parallel computing: cores vs threads

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223899

I’m running Mathematica on a machine wtih 48 cores and 96 threads. I want to limit the number of threads the computation can have access to. If I give LaunchKernels[1] it correctly launches a single ...

asked by Paolo Pani https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73287 8 votes

answered by Mr.Wizard https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=121 9 votes

Convert ConvexHull to Inequality

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223943

I have the following convex hull.

P0={0,0,0}; 
P1={1,0,0}; 
P2={0,1,0}; 
P3={0,0,1}; 
 
ConvexHullMesh[{P0,P1,P2,P3}]

Now I want the region algebraically as equality of the convex hull generated, in ...

asked by Sumit Banik https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=71940 7 votes

answered by kglr https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=125 9 votes

Multi-variable Fixed Point Iteration Command?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223817

We want to find the zeros of a multi-dimensional function

  f[x_, y_] = {x + 1/4 (-Cos[x] + Sin[y]), x - y - Sin[y]/4}

To find the zeros, we can initialize and show the iterates using FindRoot

asked by Moo https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36141 7 votes

answered by flinty https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=72682 7 votes

Unimport wolfram language package

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224140

In Wolfram Language, Import["file.wl"] can import external wolfram package, Is it reversible? Can I unimport some packages? In other means Unset all the Function, Variable which is Set when ...

asked by Audra Jacot https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=67051 6 votes

answered by Szabolcs https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=12 7 votes

2.24.2 Greatest hits from previous weeks

Positioning axes labels
Using Export[] sends the file where?
How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc
Generate a Unit Circle Trigonometry
How to add a vertical line to a plot
Selecting every n-th element from a list
How to plot an ellipse?

Positioning axes labels

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=87388

I need to change the position of my axes labels such that the y-axis label is in the middle and parallel to the y-axis. I’d also like the x-axis label to be in the middle of the x-axis rather than ...

asked by John_dydx https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=7849 15 votes

answered by Virgil https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27697 16 votes

Using Export[] sends the file where?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=8586

I am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can’t find the file! Where is it supposed to go? Did it even work?

asked by Patrick Da Silva https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=1785 37 votes

answered by Vitaliy Kaurov https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=13 51 votes

How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=66273

I’m trying to expedite some quantum mechanical calculations (expectation values etc.) by running them through Mathematica. When I say, for example,

u[x_] := Sqrt[2/L] * Sin[Pi * n * x / L]

and then ...

asked by Matthew Brunetti https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=22304 36 votes

answered by SquareOne https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=19960 22 votes

Generate a Unit Circle Trigonometry

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=2456

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :

asked by 500 https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=172 18 votes

answered by Mark McClure https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=36 32 votes

How to add a vertical line to a plot

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=3561

In the plot below I would like to add two vertical lines at \(x = \frac {\pi }{15} \pm \frac {1}{20}\). How can I do that?

f[x_] := (x^2 z)/((x^2 - y^2)^2 + 4 q^2 x^2) /. {y -> /15, z -> 1, q ->  ...

asked by sjdh https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=515 54 votes

answered by Ajasja https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=745 75 votes

Selecting every n-th element from a list

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=64003

I have a list:

data = {4, 5, 7, 8, 9, 5, 3, 2, 1, 2, 13, 12}; 
 
I want to take those elements in the list which are located at equal distances, 
say, every third element, getting the list {7, 5, 1,  ...

asked by Suro https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=20003 34 votes

How to plot an ellipse?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=20100

I’m new to Mathematica, and I’m finding it difficult to plot an ellipse. I tried using

Plot[(x/5)^2 + (y/3)^2 == 1, {x, -5, 5}, {y, -3, 3}]

but I’m getting some errors. Is there something wrong ...

asked by Sriram https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=6075 17 votes

answered by Jens https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=245 29 votes

2.24.3 Can you answer these questions?

Export Large Sparse Matrix As .mtx File
What are "VariableReplacementDump" and "TranscendentalDump"?
Why doesn’t Mathematica provide an answer while Wolfram|Alpha does, concerning a series convergence?

Export Large Sparse Matrix As .mtx File

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223991

I’m trying to export a large sparse matrix of dimension 1164960 by 1164960 with 17815680 elements as an .mtx file so I can import it into Python. I first the run the following code successfully.

asked by Daniel Berkowitz https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=27536 1 vote

What are "VariableReplacementDump" and "TranscendentalDump"?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=223879

I have run into a Mathematica object I’ve never seen before and Googling those reveals nothing. I’m talking about VariableReplacementDump and TranscendentalDump. Here’s how I got these:

asked by Lokdal https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=23117 1 vote

Why doesn’t Mathematica provide an answer while Wolfram|Alpha does, concerning a series convergence?

https://mathematica.stackexchange.com/landing/r/digest?cta=question&id=224072

Among other series I’ve been working on, I was asked to find whether \[\sum _n 1-\cos (\frac {\pi }{n})\] converged, and Mathematica’s output to

SumConvergence[1 - Cos[Pi/n], n] simply was repeating the  ...

asked by Hal https://mathematica.stackexchange.com/landing/r/digest?cta=user&id=73083 1 vote