Nick

25 Reputation

4 Badges

15 years, 27 days

MaplePrimes Activity


These are replies submitted by Nick

I agree that my knowledge of other programming languages is hindering my understanding of Maple, primarily because they embody different paradigms.  I suppose learning to program in Maple is the next big step.  Is there anywhere where I can find examples of fully fleshed out programs?

I own the Introductory and advanced programming guides linked above and have looked through them pretty extensively.  Unfortunately, while they cover an extensive array of topics, they are a bit short on details, often neglecting detailed explanations as well as larger examples that show how all the concepts fit together into the puzzle.  Is there another resource available that I can reference besides Google?

With regards to program structure:

Should I basically put the entire thing inside a module and declare most of my structures to be local.  Then I can pass these structures into the many procedures that I intend to call.  Or is it appropriate to use global variables?  I understand in many languages that this latter technique is often highly discouraged.

I want to clarify that this is not a school assignment; it is for research purposes.  I can solve the problem any way I like. With that out of the way, let's continue.

I imagine that an ODE solver would solve the problem for me; however, I am a little wary to use such a tool.  My hesitation arises because I am very new to Maple.  I have a feeling that by using the more complex tools that Maple offers, I may come to a point where I need to access data that Maple stored but be unable to figure out how to do so.  If I write everything on my own, I can guarantee I will know the inner-workings on the program and will be able to change them in the future.

Can you clarify exactly how this tool functions and whether or not it would restrict the flexibility I have with the program?

I want to clarify that this is not a school assignment; it is for research purposes.  I can solve the problem any way I like. With that out of the way, let's continue.

I imagine that an ODE solver would solve the problem for me; however, I am a little wary to use such a tool.  My hesitation arises because I am very new to Maple.  I have a feeling that by using the more complex tools that Maple offers, I may come to a point where I need to access data that Maple stored but be unable to figure out how to do so.  If I write everything on my own, I can guarantee I will know the inner-workings on the program and will be able to change them in the future.

Can you clarify exactly how this tool functions and whether or not it would restrict the flexibility I have with the program?

Thank you very much for the advice.  I will write back with that information as soon as possible.  I am simply waiting for my Professor to come into office.

Thank you very much for the advice.  I will write back with that information as soon as possible.  I am simply waiting for my Professor to come into office.

That makes sense.  Thank you.

I guess I have two more questions now.

Since I will only know the values of the first vector when the program starts, how can I tell the computer that this list will contain 120 vectors and that the values of the last 119 values are undefined when the list is created?  In essence, I won't be typing out

velocities := [[1,2,3],[2,3,4],[4,3,2]...(to 120)];

Additionally, how can I access the individual x,y, and z components of each vector in my list.

To try to better understand this problem, I create a vector that was NOT in a list.

Velocities := Vector[1,3,6];

I then tried to change the first component of the vector like one might with a list by saying

Velocities[1] := 4;

This didn't seem to do anything.

Do you think that it would be easier to simply use a list of lists?  I only need to be able to do two things with this list: I need to select and change individual components of each sublist inside the list, and I need to perform a few advanced calculus functions on these lists.  What data structure do you think would best suit my needs?

Thank you again 

EDIT:  I was looking online a bit more and noticed that lists are ordered.  This is definitely not a property that I want my data structure to have.  Should such an attribute deter me from leaning towards the list data structure?

That makes sense.  Thank you.

I guess I have two more questions now.

Since I will only know the values of the first vector when the program starts, how can I tell the computer that this list will contain 120 vectors and that the values of the last 119 values are undefined when the list is created?  In essence, I won't be typing out

velocities := [[1,2,3],[2,3,4],[4,3,2]...(to 120)];

Additionally, how can I access the individual x,y, and z components of each vector in my list.

To try to better understand this problem, I create a vector that was NOT in a list.

Velocities := Vector[1,3,6];

I then tried to change the first component of the vector like one might with a list by saying

Velocities[1] := 4;

This didn't seem to do anything.

Do you think that it would be easier to simply use a list of lists?  I only need to be able to do two things with this list: I need to select and change individual components of each sublist inside the list, and I need to perform a few advanced calculus functions on these lists.  What data structure do you think would best suit my needs?

Thank you again 

EDIT:  I was looking online a bit more and noticed that lists are ordered.  This is definitely not a property that I want my data structure to have.  Should such an attribute deter me from leaning towards the list data structure?

1 2 Page 2 of 2