Tables/Matrices in Mathematica

  • Mathematica
  • Thread starter musicgirl
  • Start date
  • Tags
    Mathematica
In summary, the conversation is about creating a table or matrix in Mathematica to describe a system of differential equations. The desired table has two columns, with the first column containing a specific equation and the second column containing a different equation. The individual is looking for a way to define the number of equations and extend to higher dimensions. They have found a solution using the Table function in Mathematica.
  • #1
musicgirl
12
0
Hi,

I'm trying to make a table/matrix in mathematica to describe a system of differential equations that I have. At the moment, what I want is a table with the first column reading

(A*v*(1-v)*(1-a)-w-w0)/e

and the second column reading

v-g*w-v0

and I want to be able to arbitrarily define the number of equations I have so I can extend to higher dimensions.

I know how to get the array I'm after, for instance...

n = *insert appropriate number here*
Table[(A*v*(1-v)*(1-a)-w-w0)/e,{i,n},{j,2}]

But I don't know how to get a different set of equations in the second column. Any ideas, or am I taking the wrong approach entirely?

Thanks for your help!
 
Physics news on Phys.org
  • #2
Is this something like what you are looking for?

Table[{(A*v*(1-v)*(1-a)-w-w0)/e,v-g*w-v0},{i,n}]
 
  • #3
Yep that works great. Thanks very much!
 

Related to Tables/Matrices in Mathematica

1. What is a table/matrix in Mathematica?

A table or matrix in Mathematica is a data structure used to store and organize data in the form of rows and columns. It is similar to a spreadsheet or a two-dimensional array in other programming languages.

2. How do I create a table/matrix in Mathematica?

To create a table or matrix in Mathematica, you can use the Table or Array function. For example, Table[i, {i, 1, 5}] will create a table with numbers 1 to 5 in a single column, while Array[f, {3, 3}] will create a 3x3 matrix filled with the function f.

3. How do I access elements in a table/matrix in Mathematica?

You can access elements in a table or matrix in Mathematica by using double square brackets [[ ]]. For example, myTable[[2,3]] will access the element in the second row and third column of the table myTable.

4. Can I perform mathematical operations on tables/matrices in Mathematica?

Yes, Mathematica has built-in functions for performing mathematical operations on tables and matrices. Some examples include Plus for addition, Times for multiplication, and Transpose for matrix transposition.

5. How can I visualize a table/matrix in Mathematica?

There are several ways to visualize a table or matrix in Mathematica, such as using the ListPlot or MatrixPlot functions. You can also use the TableForm or MatrixForm functions to display the data in a more organized format.

Similar threads

Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
535
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
15
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
994
Back
Top