Message Boards Message Boards

0
|
7145 Views
|
9 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Errors and no graphics for a simple Plot function

Posted 11 years ago
I am trying to plot a function that is regular, finite, and single valued at all points with no poles. 

When I use
Plot[%,{x,2.,10.,.2}]
or
Plot[f(x),{x,2,10}
all the output is
-Graphics-
When I try and duplicate what is in the Mathematica manual, any of the simple examples, I get the same output: -Graphics-.

What does this mean? Am I somehow missing a plug in? The following is the output from the direct effort to plot the function:
General::ivar: 2. is not a valid variable.
General::ivar: 2.2 is not a valid variable.
General::ivar: 2.4 is not a valid variable.
General::stop: Further output of General::ivar will be suppressed during this calculation.
Out[55]= -Graphics-

I am pretty sure the syntax is OK. I am puzzled and stumped.

Thanks for the help.

Luther
POSTED BY: Luther Nayhm
9 Replies
Posted 11 years ago
Hi and thanks for following through. First, the % refers to a differentiation of a messy algebraic function in the preceding action. 

Once it became clear what the "front end" was, I was able to plot my function.

Thanks for your interest and contributions. Sooner or later I tend to get it.

Luther
POSTED BY: Luther Nayhm
... in my last posting the parenthesis do no show up.
I wanted to say, you probably want to
Print[f[x],{x,2,10}]
rather then
Print[f(x),{x,2,10}]

Sorry for the confusion.

Henrik
POSTED BY: Henrik Schachner
Hi Luther,

I do not know what in this case % is standing for,
but maybe you should try to plot f rather f(x).

Henrik
POSTED BY: Henrik Schachner
Posted 11 years ago
I use Windows 7 64-bit OS.

However, using the front end, which is really the Notebook, I can get the functions to operate properly.

Thanks for the clues for discovering what the front end really is within Mathematica.

Why can't Wolfram simply call things by how they are named. It is OK to be software geeky, but even the books I have read don't make it clear.

The kernel has its own icon and the functions execute within that interface. How would anyone know that the "instructions" for opening the Notebook were in fact enablish a front end that was required to excute certain graphical functions?

Anyway, I am on track and thanks for the help.

Luther
POSTED BY: Luther Nayhm
Well, in linux, you can launch the front end with the command mathematica. I'm not entirely sure, but I think the command is the same on Mac (I always use the icon in that bar at the bottom) and I always just use the start menu item in Windows. If you're using a unix based system, a front end does requires some form of X-win. 

The front end was separated from the kernel a long time ago so that you could run computations and still have a responsive Mathematica running, in case you wanted to quit the computation or any number of other things. Most people use the front end and run a notebook, which has a graphical interface. In that form, it's kind of a graphical interactive computational engine as opposed to something terminal-like which is how the kernel runs. When you use a command like Plot, the front end sends the command to the kernel which commputes what the result should be. That result is then sent to the front end which takes the result and creates the actual graphics. Plot is one of many functions that requires a front end to execute. 
POSTED BY: Jason Grigsby
Luther, I am curios, what OS are you on?
POSTED BY: Sam Carrettie
Run Mathematica, rather than Wolfram.  In the Wolfram language, graphics have to be exported to be viewed.
POSTED BY: Frank Kampas
Posted 11 years ago
Busted! Yeah, I'm running it in the kernel.

How do you launch the front end?

In fact, what is the front end? The documentation seems to be pretty silent on the topic.

Thanks for the response.

Luther
POSTED BY: Luther Nayhm
It sounds like you are running this in the kernel and not the front end. How did you launch Mathematica?
POSTED BY: Jason Grigsby
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