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
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
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
Related Tags
syntax × 887functions × 79
list-manipulation × 76
function-construction × 64
plotting × 57
programming × 42
equation-solving × 40
calculus-and-analysis × 40
differential-equations × 35
evaluation × 33
core-language × 28
matrix × 22
numerical-integration × 22
symbolic × 22
warning-messages × 21
replacement × 20
symbols × 19
custom-notation × 18
expression-manipulation × 16
operators × 16
performance-tuning × 15
simplifying-expressions × 15
mathematical-optimization × 15
front-end × 15
variable-definitions × 15