Skip to main content

New answers tagged

0 votes

Applying function to lists

list = {0.67, 0.89, 0.70, 0.78, 0.54}; n = 17; ...
eldo's user avatar
  • 74.5k
4 votes

How to explain a formula from a generalized hypergeometric function

It looks like ThreeJSymbol in OutputForm. The inputForm used what is called ClebschGordan. ...
Nasser's user avatar
  • 145k
5 votes
Accepted

Function with complicated argument constraint with default value

In this case, the first : which is the shorthand of Pattern cannot be omitted (yeah n_ is ...
xzczd's user avatar
  • 66.8k
2 votes

How to retrieve the index of a subset in Subsets[list,nspec,{s}]?

Here's an approach. I'm not 100% confident, but it seems to work on the test cases I've tried. Given a subset, we can turn it into a sort of mask that picks out elements from ...
lericr's user avatar
  • 29k
2 votes

How to retrieve the index of a subset in Subsets[list,nspec,{s}]?

Here is a not too clever solution. We may simply check all answers of Subsets[Range[2000], {4}, {i}] for i=1,2,...: ...
Daniel Huber's user avatar
  • 52.6k
5 votes
Accepted

How to insert a graphics between two points?

First, remove any paddings and margins from res by setting PlotRangePadding -> None, ImagePadding -> 0. Then specify the ...
Domen's user avatar
  • 26.3k
4 votes

How to find the value of $f(2023) + f(2024)$?

I note and agree with comments. IMHO these questions require some thought rather than blindly using in-built functions and can be approached in a number of ways. I may have made a mistake. If so I'll ...
ubpdqn's user avatar
  • 61.6k
1 vote

Perform Apply[] to a sum of objects

Using Query Query[{f, g} /* Total] @ a f[a] + g[a]
eldo's user avatar
  • 74.5k
2 votes

Problems with ArcTan making a jump

"Unwrapping" is the term for making the line continuous by implicitly choosing the appropriate branch for each point. (Only possible if you are processing a range of values, e.g. when ...
Jos Bergervoet's user avatar
1 vote

How can I delete duplicates with Abs?

...
eldo's user avatar
  • 74.5k
1 vote

Is it possible to have ToString operate on an expression containing Prefix (@) ? for example exp = [email protected]

The problem here is that notation like f @ x doesn't exist on the expression level; there's no difference between f[x] and ...
Sjoerd Smit's user avatar
  • 23.6k
0 votes

Is it possible to have ToString operate on an expression containing Prefix (@) ? for example exp = [email protected]

It just so happens that your symbolic email parses to an actual Mathematica expression: ...
lericr's user avatar
  • 29k
3 votes
Accepted

How to use /; The way to solve this problem?

This question is beyond mma's capabilities, and should be deduced beforehand using math. These equations ...
wioiw's user avatar
  • 121
0 votes

Can Mathematica compute the maximum as a function of parameters?

I think this can be done only numerically. ...
user64494's user avatar
  • 26.6k
1 vote

Can Mathematica compute the maximum as a function of parameters?

Need to be careful with possible zero denominators and real, non-integer powers. ...
Bill's user avatar
  • 12.1k
2 votes
Accepted

How to find the cumulative value through the abstract function analytic expression?

On Version 14.0 ...
ubpdqn's user avatar
  • 61.6k
3 votes
Accepted

Why does this FirstPosition not work?

As written in the documentation for FirstPosition, by default, Heads is set to True. This ...
Domen's user avatar
  • 26.3k
2 votes

Is there a better method and more efficient way to determine the type of triangle based on the coordinates of its three vertices?

...
lericr's user avatar
  • 29k
3 votes

How do I extract the domain values associated with a ColorDataFunction?

Some things you can do Get range ColorData["VisibleSpectrum", "Range"] {380, 750} Extract all elements ...
eldo's user avatar
  • 74.5k
2 votes

Is there a better method and more efficient way to determine the type of triangle based on the coordinates of its three vertices?

Try Map[Sign[Cross[#[[2]] - #[[1]]] . (#[[3]] - #[[1]])] &, triangles] (*{-1, -1, -1, -1, 1, -1, 1, 1, 1}*) Positive sign gives counterclockwise orientation, ...
Ulrich Neumann's user avatar
0 votes

Creating function with array input with desired coefficient and evaluate it

Barring errors: f[a_] := With[{w = Length@a}, Table[(Range[w] a) . a - k a[[k]]^2 - Exp[a[[k]]], {k, 1, w}]] Some tests ...
ubpdqn's user avatar
  • 61.6k

Top 50 recent answers are included