Hot answers tagged

6 votes
Accepted

How can I replace the locally defined function inside If with its value?

Your issue results from the fact that If holds its second and third arguments: Attributes[If] (* {HoldRest, Protected} *) This ...
  • 4,961
6 votes

How to transform the output regarding exponentiation?

One option is to use CForm to do the heavy lifting, followed by StringReplace to apply the final tweaks (e.g. renaming functions ...
  • 29.9k
6 votes

Annular cylinder with varying dimensions

Method-1 At first we draw the sectional graphics; ...
  • 49.6k
5 votes
Accepted

Annular cylinder with varying dimensions

Here's a couple CSG approaches: ...
  • 34.1k
4 votes

How can I replace the locally defined function inside If with its value?

I may not be grokking what you're going for, but maybe this: ...
  • 14.2k
4 votes
Accepted

Dealing with locally defined functions in Module while exporting/importing

You may benefit by using Pure Functions ...
  • 33.6k
4 votes

How can I replace the locally defined function inside If with its value?

You should be able to use Piecewise instead of If: ...
  • 225k
4 votes
Accepted

String to expression does not work properly

The smallest fix would be to change the final _ to ___. I.e. the pattern would look like this: ...
  • 14.2k
2 votes

Verifying matrix exponential identity

I think the easiest and fastest way is to help Mathematica. That is to use a FullSimplify with some Assumptions at the level of <...
  • 9,642
2 votes
Accepted

Replacement for Association in the following case

Add HoldForm to the integrals: ...
2 votes

Annular cylinder with varying dimensions

That seems a rather skinny cylinder: p1 = Tan[0.0134] ; p2 = Tan[0.269]; ParametricPlot3D[{p1 z Sin[phi], p2 z Cos[phi], z}, {z, 1, 10}, {phi, 0, 2 Pi}] With a ...
  • 35.6k
1 vote

Is there a syntax for single-line comments for notebooks?

There is now auto-matching of delimiters: https://reference.wolfram.com/language/workflow/EnterPairedDelimiters.html So if you type (* you automatically get ...
  • 2,722

Only top scored, non community-wiki answers of a minimum length are eligible