13 Understanding different types of constants (Pi):
Understanding different types of constants (Pi):
1. To begin with, simply defining the value of Pi for instance; entering in “>> pi” allows you to define the constant and its
associated numerical value, 3.1416.
2. To directly manipulate the constant into a variable, the MATLAB user can for example change the value of said “Pi”
into 7 for example by just defining it as such, “>> pi = 7” and from that point on, pi, now a variable, has a numerical
value of 7, as preferred by the MATLAB user.
3. To revert a variable we’ve customized back into its original value as a constant (3.1416)? Simply locate the
“Workspace” tab at the bottom left of the MATLAB platform and select the value we wish to edit/adjust.
4. So, in this case we right click “pi” and it will present us with a list of properties and commands, in which case you
simply select “Delete”. By doing so this allows you to restore Pi into its constant numerical value once again,
3.1416….