Skip to main content

New answers tagged

2 votes

How to leave only specific columns?

...
eldo's user avatar
  • 75.1k
3 votes

Replacing elements of one table with the elements of another table for common grid

Using Merge and MapApply (new in 13.1) ...
eldo's user avatar
  • 75.1k
1 vote
Accepted

Nested integration of the list of functions returns error

The intermediate solution I use is based on indexing, I did not find another option: ...
seva011's user avatar
  • 316
0 votes

Proper treatment of roots and powers in Series?

Try the following code: ClearAll[r, p]; Log[r^2 - Sqrt[r^4 + p^2] + O[p]^3 //PowerExpand] (* Log[-p^2/(2*r^2)] + O[p]^1 *) Note the use of ...
Somos's user avatar
  • 4,907
3 votes

How to check if the given row matches one of the rows of a table?

tabb = { {1, 0, 4, 0}, {4, 1, 2, 1}, {0, 3, 3, 4}, {2, 0, 4, 1}, {3, 0, 3, 4}}; row = {2, 0, 4, 1}; Three more simple methods ...
eldo's user avatar
  • 75.1k
4 votes
Accepted

Outer function for nested list

Tuples may be easier than Outer. For example, using: ...
ubpdqn's user avatar
  • 61.6k
0 votes

Define certain argument in functions which depend on several arguments and built in a list

One way might be ...
lericr's user avatar
  • 29.2k
2 votes

Using Through at lowest

Using Thread: Apply[#1@#2&,Thread/@Thread[{{{#*2 &, #*8 &}, {#*3 &, #*5 &}},a}],{2}] ...
E. Chan-López's user avatar
1 vote

Expression cannot begin with

Based on the comment from @xzczd, as well as the other links referred to there, this is the complete answer to my question, which may be helpful to others: ...
Aharon Naiman's user avatar
4 votes

Using Through at lowest

Using Query Query[{{#*2 &, #*8 &}, {#*3 &, #*5 &}}] @ a {{2 a, 8 a}, {3 a, 5 a}} Using ...
eldo's user avatar
  • 75.1k
1 vote

Splicing a list of arguments into a function with Sequence

Using FlattenAt With atomic elements array = {e, f}; FlattenAt[-1] @ f[a, b, c, d, array] f[a, b, c, d, e, f] With non-...
eldo's user avatar
  • 75.1k
1 vote
Accepted

Syntax error when running file created with Save which contains backslashes

TL;DR: It's not a bug, you are just using the functionality incorrectly. As I have already mentioned in the comments, in my opinion, this is not a bug. I suggest you read the tech note on Reading and ...
Domen's user avatar
  • 26.5k
4 votes

Syntax error when running file created with Save which contains backslashes

It is a bug and should be reported to Wolfram. Save puts \ in a wrong place for some numbers as can be seen in the first file. ...
azerbajdzan's user avatar
  • 18.9k
2 votes

How to make two sub-sets each with two distinct elements having a list with four elements?

Using SubsetCases (new in 12.1) sub = Transpose @ Partition[SubsetCases[list, {_, _}, Overlaps -> True], 3] {{{{meson1, p1},...
eldo's user avatar
  • 75.1k
3 votes
Accepted

Why using compiled code inside compiled code may slow things down?

Generic (?) MWE: The inlined version cf1 copies the argument (CopyTensor) of the inlined function; the equivalent coded ...
Goofy's user avatar
  • 3,102

Top 50 recent answers are included