Questions tagged [faq]
Frequently Asked Question – a tag for original questions which have a multitude of duplicates
65 questions
11
votes
3
answers
1k
views
Why doesn't b = a; f[a_] := b; f[2] return 2?
As the title asks, why does
b = a;
f[a_] := b;
f[2]
evaluate to a rather than 2?
10
votes
3
answers
2k
views
How to clear up RAM without exiting kernel?
I am trying to implement the code which generates some table, works with it, extracts some numbers, add them to some other table, then clears the table (only the table and not the other elements of ...
5
votes
1
answer
239
views
With vs. Block scoping of parameters for Plot
A very basic question..
Why does Block work, but not With, to specify value of a parameter for a function to be plotted?
...
4
votes
1
answer
266
views
How to preserve scaled circular shapes when combining graphics?
The following code
g1 = Graphics[{Thickness[0.01], Line[{{0, 0}, {10, 10}}], Disk[{5, 3}, Scaled[0.1]]}, Frame -> True]
produces the following output
I then ...
7
votes
2
answers
896
views
Why changing to float-point value does't improve the speed?
I am testing the first tip of this article
Use floating-point numbers if you can, and use them early.
I've compared a pair codes and finding it's not helpful to use the float-point number during ...
4
votes
3
answers
239
views
Keep only rules that replace integers with other integers
Let's say I have a list of replacement rules:
List1 = {2 -> 3, b -> 5.5, 6.57 -> 2, 3 -> 4.5, 1 -> -1, 0.03 -> 0.5, 9 -> a}
The desired ...
7
votes
2
answers
501
views
Grid with Frame->All: How to not draw frames around empty cells?
If I have a grid of values that doesn't divide evenly, for example a list of 17 values, and split it into a 7x3 grid, then draw frames around each element:
...
120
votes
4
answers
31k
views
Why should I avoid the For loop in Mathematica?
Some people advise against the use of For loops in Mathematica. Why? Should I heed this advice? What is wrong with For? What ...
13
votes
4
answers
3k
views
Capital Letters that are built-in symbols
I'm trying to search for an answer to "What is the complete list of single capital letters that represent built-in Mathematica commands, symbols, or uses?"
For example:
C, D, E, I, N, O
Is this the ...
10
votes
1
answer
856
views
Package functions and symbolic calculations
I'm writing my package (.m) in Mathematica and when I call the function it returns 0 instead of a right output.
Here's my code:
Package.m
...
2
votes
1
answer
2k
views
Piecewise Function, Explanation of Extra Case
Consider:
Can someone explain why the 0, True occurs?
As a second question, I like to fill the endpoints as follows:
...
33
votes
1
answer
40k
views
What do the X and Y axis stand for in the Fourier transform domain?
In Wolfram Mathematica the function Fourier has the following declaration
Fourier[list]
And after a list is given to the ...
52
votes
3
answers
6k
views
Changing Values in an Association using Map
I am trying to change the value of one key in an association based on the value of another key in that association. So if my association starts as:
...
9
votes
2
answers
3k
views
A problem about function N
Toady,I have a problem about N,described as below:
For example
N[1/3, 5]
(* ==> 0.33333*)
and ...
8
votes
4
answers
1k
views
Efficient method for Inserting arrays into arrays
This is strongly related to the following Questions:
Looking for a way to insert multiple elements into multiple positions simultaneously in a list
Building matrices by attaching vectors (columns) and ...