Jump to content

Using Mathematica to plot series with two indices

Featured Replies

I am not sure if this should be in Math section or in Computer section, but since it's about math, I'm hoping one of the experts here could help me out.

 

I have an equation related to my research that I want to model in Mathematica. The point at the moment is to try and graph the angle on a circle of a group of particles (the 'n' index counts particles) per time (t index). I managed to produce a lineplot per time if I create individual functions for the particles (defining Phi1[t_], Phi2[t_], etc) but I'm looking for a way to model both indices at once so I can see the relationship between all particles.

 

I looked things up in the Mathematica manual, but, alas, I can't find what to do. How do I represent a series with two indices so I can plot them later? anyone knows?

 

Thanks!

 

~mooey

  • 3 months later...

I am not sure if this should be in Math section or in Computer section, but since it's about math, I'm hoping one of the experts here could help me out.

 

I have an equation related to my research that I want to model in Mathematica. The point at the moment is to try and graph the angle on a circle of a group of particles (the 'n' index counts particles) per time (t index). I managed to produce a lineplot per time if I create individual functions for the particles (defining Phi1[t_], Phi2[t_], etc) but I'm looking for a way to model both indices at once so I can see the relationship between all particles.

 

I looked things up in the Mathematica manual, but, alas, I can't find what to do. How do I represent a series with two indices so I can plot them later? anyone knows?

 

Thanks!

 

~mooey

 

Ok, im specialized in Mathematical Logic and Computer Science .. but, I'll try to help ...

 

Let me say what I understand from your thread:

 

You have a program that periodically measure number of particles, And insert it into

A series ...

 

So, given period D, and Testing time T, we have series S where ...

 

[latex]S = \{ \Phi_1, \Phi_2, \Phi_3, \dots \}[/latex]

 

the program's algorithm should be like this:

 

---------------------------------------------------------

 

SET: TYPE { INTEGER, INTEGER }, S = { EMPTY_SET }

PROMPT: " ENTER TEST TIME, IN STEPS: "

INPUT: T = KEYBOARD.INPUT ( )

INTEGER: t = 0

INTEGER: PHI = 0

 

+WHILE ( t < T )

+-- PHI = FUNCTION.GET_NUMBER_OF_PARTICLES ( )

+-- S.ADD ( { PHI, t } )

+-- t = t + 1

+WHILE_END

 

PLOT.SET_VALUES ( S )

PLOT.X_AXIS ( 1 )

PLOT.Y_AXIS ( 2 )

PLOT.DO_PLOT ( )

 

PROGRAM.HALT

 

-----------------------------------------------------------------

 

explanation of the algorithm:

 

SET: TYPE { INTEGER, INTEGER }, S = { EMPTY_SET }

here we define a set, where every element of the set is composed of two integers

 

PHI = FUNCTION.GET_NUMBER_OF_PARTICLES ( )

you have to define the function that will return number of particles

 

S.ADD ( { PHI, t } )

here we add { Number_Of_Particles, Time_Tag } as a new element to the Set S

 

PLOT.SET_VALUES ( S )

give the set of Values to be plotted on a 2D plane

 

PLOT.X_AXIS ( 1 )

tell the plotter that the first component of every element in the set is the X axis

 

PLOT.Y_AXIS ( 2 )

tell the plotter that the second component of every element in the set is the Y axis

 

PLOT.DO_PLOT ( )

ask the plotter to plots the values on the screen

 

note: This algorithm is abstract, specifications are made at the coding level ...

 

good luck,

Edited by khaled

  • 1 month later...
  • Author

Khaled, thanks a lot! I missed this reply for some reason, which is why I just now respond.

 

I decided, actually, to switch to MatLab. Awkwardly enough, it's much more convinient to use.. Mathematica is just too complicated for its own good, it seems.

 

I will try this in mathematica though (I now have both) - this seems like it might actually solve a huge chunk of my problem.

 

Thanks!

 

~mooey

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.