Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Get function returning all evaluated expressions' topicStudent Support Forum > General > "Get function returning all evaluated expressions"

Help | Reply To Topic
Author Comment/Response
Guilherme
04/19/12 3:08pm

I have a lot of files named problem1.m, problem2.m, problem3.m, ... , problem20.m

In these files i set a lot of instructions like Initial conditions of my problem and some equations...

My main program is called Lagrange.m

this program / file, solve the problems 1, 2, 3 , ... , 20...
and show a lot of graphics and also a huge Animate...

for now, i'm using the command "<< problem1.m" in the first line above the codes inside the Lagrange.m, to solve the problem1.m...
and, if I need to solve the problem20.m, I need to change the text inside my Lagrange.m to "<< problem20.m"...

So...
I don't want to open and reopen the Lagrange.m a million of times...
I want to open the problem1.m and insert "<< Lagrange.m" in the end of the code...

finally, my problem is...
when i use it: "<< Lagrange.m", i only receive the last evaluated feedback...
and I need to receive all the graphics and all the animations inside the Problem1.m...

HOW CAN I DO THIS??
I think I can't use the "<<", because in the Documention Center it says:

<<name
reads in a file, evaluating each expression in it, and returning the last one.
-----------------------------

so, It will return the last one...

i need a function to to this:
reads in a file, evaluating each expression in it, and returning ALL OF THEM!!


Can you help me?

URL: ,
Help | Reply To Topic