Message Boards Message Boards

0
|
4586 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Problem with loading file in Mathematica

Posted 9 years ago

Hi all,

I'm facing the following problem which i think should be relatively easy to solve, but somehow my efforts failed to solve it;

By means of an online available tool an integration and differentiation model is translated in Mathematica language and respective output. This is file is attached as 'model 7 final'. The aim is to calculate the eigenvalue elasticities of this model by using the LEEA document, which is also attached. Normally this should all go automatically, i did not write the file myself and am merely using it to get the output from it. However, when evaluating the LEEA document it requires that a third document; 'feedback loops' is loaded into Mathematica. I followed the instructions, looked into the Mathematica reference guide which states that the feedback loop file should go to: C:\DocumentsandSettings\AllUsers\ApplicationData\Mathematica, and located the file in: C:\Users\AppData\Roaming\Mathematica

However, the LEEA document still gives me the message: 'Need feedback loops', when i'm evaluating the LEEA document. Replacing the name of the file with the filepath also didn't work. I attached the document LEEA test 1 where it shows this message. I tried several variations of the feedback loops document location but none of them worked. My question is then also where i should locate te feedback loop file so that Mathematica recognizes it when I evaluate the LEEA document? I'm using Windows 8.

All help would be appreciated as I'm a novice in using Mathematica.

Attachments:
POSTED BY: JHM Bruijn
3 Replies

That depends on what kind of representation you want. Do you want a function?

f[x_] := If[200 <= x <= 200.125, 1000, 0]

Other ways to represent this have different benefits, but this is the simplest.

If you are totally new to using Mathematica, I would suggest reading through the virtual book:

https://www.youtube.com/watch?v=2wlk9qqPxp4

POSTED BY: Sean Clarke
Posted 9 years ago

Thank you for your reply. It helped me to continue! I ran however in a new problem; I would like to use a rectangle function but with a customized hight and location for x. E.g X is 0 outside the interval [200,200.0125], but inside the interval X is 1000. How could this be represented in Mathematica?

POSTED BY: JHM Bruijn

There's a lot of content here. If I understand you correctly, you are trying to load FeedbackLoops.m.

What code do you use to load FeedbackLoops.m?

Try using the Needs command:

Needs["FeedbackLoops`", "ThePathToFeedbackLoops"]

The second argument to Needs is the location of FeedbackLoops.m. If you do this, you don't have to place the file in a specific location because you will be telling Mathematica where the file is located.

To get the file path as a string use the toolbar and go to "Insert" > "File Path ...". Use the dialog to select FeedbackLoops.m. This will produce a string representing the location of the file.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract