Skip to main content

Questions tagged [semantic-matching]

Posts about semantic pattern matching rather than syntactic pattern matching (which is the built-in pattern matcher of Mathematica) e.g. "Why x^3 /. x^2->a doesn't work!"

Filter by
Sorted by
Tagged with
60 votes
4 answers
11k views

Can I simplify an expression into form which uses my own definitions?

This seems like a simple thing to do, but I couldn't find anything relevant from Mathematica documentation. So suppose I have an expression: a*b/(a + a*Cos[a/b]) ...
Echows's user avatar
  • 981
4 votes
4 answers
850 views

How to apply ReplaceAll to denominator?

Here is the simple task. In reality, it's far more complicated, but it comes down to this. I want to take the expression $\frac{y}{x^2}$ and replace $x^2$ with $k$. This doesn't work: ...
Luka's user avatar
  • 133
3 votes
1 answer
201 views

ReplaceAll with Powers [duplicate]

If I run the following code: a^2/b^2 /. {a/b -> c} I'm getting output: a^2/b^2 How can I obtain ...
Mieczmik's user avatar
0 votes
1 answer
200 views

Using Semantic Import to do an Excel-like VLookUp using Mathematica

I'm following an example provided in the following Stack Exchange Link but, using a different approach. My data is contained in an Excel workbook called "Input Workbook.xlsx" as shown here: I ...
Gilmar Rodriguez Pierluissi's user avatar