mooeypoo Posted September 26, 2010 Posted September 26, 2010 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
khaled Posted January 19, 2011 Posted January 19, 2011 (edited) 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 January 19, 2011 by khaled 2
mooeypoo Posted March 2, 2011 Author Posted March 2, 2011 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now