What command to be used in Mathematica

  • Mathematica
  • Thread starter kaizen.moto
  • Start date
  • Tags
    Mathematica
In summary, the commands in Mathematica for creating a list, plotting a function, defining a variable, performing calculations, and clearing all variables and definitions are "List", "Plot", "Set", basic arithmetic operators and functions, and "ClearAll"/"Clear" respectively.
  • #1
kaizen.moto
98
0
Hi,

Iam looking for a specific command(s) that could give outputs which are determinate only, i.e. only and only if the outputs are not infinity.

This is due to the fact that I have iterations cases (using Do-loop) which give both determinate and indeterminate outputs. However, I just wanted to generate the determinate outputs.

Please let me know.


Thank you.
 
Physics news on Phys.org
  • #2
How about Select?

Select[result,NumericQ]

or build a notInfinityQ function that returns True when its argument is not infinity.
 

What is the command to create a list in Mathematica?

The command to create a list in Mathematica is "List" or curly brackets {}. For example, if you want to create a list of numbers from 1 to 10, you can type "List[1,2,3,4,5,6,7,8,9,10]" or "{1,2,3,4,5,6,7,8,9,10}".

How do I plot a function in Mathematica?

To plot a function in Mathematica, you can use the command "Plot" followed by the function you want to plot. For example, if you want to plot the function y=x^2, you can type "Plot[x^2, {x, 0, 10}]" which will plot the function from x=0 to x=10.

What is the command to define a variable in Mathematica?

The command to define a variable in Mathematica is "Set" or "=". For example, if you want to define the variable "a" as 5, you can type "a=5". You can also use the "SetDelayed" or ":=" command to define a variable with a delayed evaluation.

How do I perform calculations in Mathematica?

To perform calculations in Mathematica, you can use the basic arithmetic operators such as "+", "-", "*", and "/". You can also use functions like "Sin", "Cos", "Exp", etc. to perform more complex calculations. For example, to calculate the square root of 9, you can type "Sqrt[9]" which will give you the result of 3.

What is the command to clear all variables and definitions in Mathematica?

The command to clear all variables and definitions in Mathematica is "ClearAll" or "Clear". This will remove all previously defined variables and functions from memory. You can also use "Clear" followed by a specific variable or function name to remove only that specific definition.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
Back
Top