This article teaches the user how write a program in a TI-Nspire calculator that takes the X, Y, and Z components of a vector and returns the vectors magnitude and its angles α (alpha), β (beta) , and γ (gamma), relative to the X, Y, and Z axes.

Steps

  1. 1
    Create a new document.
    • Turn on your TI-Nspire calculator and select the “New Document” option.
  2. 2
    Add program editor.
    • Once the new document is open, select option 9, “Add Program Editor” and “New”.
  3. 3
    Name and change library access.
    • Once you select new, a menu will pop up which prompts you to: name the program, select the type of program and select the library access.
    • This example is named “Vector” but you can choose any name less than 15 characters.
    • Keep the type set to program and select 'LibPub' from the library access menu then select “ok”.
  4. 4
    Input the variables.
    • Once you hit “ok” an empty program will show up with a spot to define input variables as well as an empty program body.
    • For this program you want to input the X, Y, and Z coordinates of a vector and return the vector’s magnitude and direction angles.
    • In the first line where it says “Define” you are going to define three variables X,Y, and Z by typing them inside the parentheses as shown.
    • These variables act as placeholders for the X,Y, and Z components of your vector and when you use the program later the X, Y and Z will be replaced with the vector components.
  5. 5
    Vector the magnitude.
    • Using calculus, we know that the magnitude of a vector [X, Y, Z] is equal to the square root of the summation of each component squared.
    • You can program your calculator to output this by storing it as the variable m.
    • To do this we type  the square root of the summation of each component squared followed by “store” followed by  M  into the program body as shown.
    • You can get to the store key by hitting the "ctrl" key then the "var" key.
  6. 6
    Set the angles.
    • In order to find the direction angles of the vector, you first need to unitize the vector.
    • Using calculus, a unit vector is found by dividing each component of the vector by the vector magnitude.
    • Next, you take the inverse cosine of each unitized component to obtain the angle relative to the respective axis.
    • For example, the inverse cosine of the unitized X component will give the vector’s angle relative to the X axis.
    • We set the angle relative to the X axis as alpha, the Y axis as beta and the Z axis as gamma:
  7. 7
  8. 8
    Save the program.
    • In order to save the program inside of the document, hit the menu button on your calculator.
    • Next select option 2, "Check Syntax and Store". From the following menu select the first option, "Check Syntax and Store".
  9. 9
  10. 10
    Refresh the libraries.
    • The last thing you must do before running the program is to refresh the calculator libraries.
    • Hit the Doc button again then select the “Refresh Libraries” option.
  11. 11
    Access your program.
    • In order to access the program, first click the library button on your calculator (it is the open book icon).
    • Next, go to the fifth page of the library menu. There you should see the name of your document as one of the options.
    • Select this option and the program will show up underneath.
  12. 12
    Run your program.
    • Click the program and it will open into the workspace.
    • Input the X, Y, and Z components of your vector.
    • Once the program runs, the first number returned will be the vector magnitude, the second will be the angle alpha, followed by beta and gamma.
  13. 13
    Run the program with a 2D vector.
    • In order to run the program for a 2D vector with only Y and X components all you need to do is enter 0 for the Z component of your vector.
    • When running the program the angle relative to the Z axis will always be 90 degrees.

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time. This article has been viewed 1,143 times.
How helpful is this?
Co-authors: 4
Updated: March 2, 2021
Views: 1,143