Message Boards Message Boards

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

Need help using Notation Package

Is there a way to use x-bar as a variable so that expressions like the one at the link below will work. From reading the none-to-helpful documentation for the Notation Package, it seems that should be possible. If it is, one or two examples might be enough for me to proceed. And one or two examples with some explanation might be enough to make it easy to proceed.

POSTED BY: Jay Gourley
6 Replies
Posted 13 days ago

Works for me, see notebook below. One trick is to avoid the form OverBar[x] when you symbolize and refer to the variable. Instead use the keyboard shortcut Ctrl& followed by _ (the underscore).

POSTED BY: Hans Milton

Thanks, Gianluca Gorni. I should clarify. The goal wasn't just to render the plot. I'm trying to become proficient with Wolfram's typeset notation, that is so much more pleasing to the mathematician's eyes. I think Hans Milton has the solution once it's explained more fully.

POSTED BY: Jay Gourley
Posted 13 days ago

I selected the Symbolize item from the Notation palette.

enter image description here

That produced this line in my notebook: enter image description here

Then filled in the placeholder and evaluated.

POSTED BY: Hans Milton

This is a way:

Plot[Evaluate[1/(s*Sqrt[2*Pi])/
    E^((x - OverBar[x])^2/(2*s^2))], {x, -2*s, 2*s}]

The problem is that in Plot the numerical values of x are replaced into OverBar[x] before the rule OverBar[x]=0 has a chance to take effect:

{OverBar[x], Hold[OverBar[x]]} /. x -> 1
POSTED BY: Gianluca Gorni

Thanks, Hans Milton. That's the solution, alright. Please expand on the way you entered the Symbolize[]. I was already using the keyboard shortcut ctrl+& and _. That wasn't the problem. But there was something else you did that created the box in which the x-bar was entered. That now appears to have been what I missed from reading the documentation.

POSTED BY: Jay Gourley

That's it. Using the notation pallet works. Typing it doesn't. There's a ParsedBoxWrapper[] function revealed in raw input form,...

Symbolize[ParsedBoxWrapper[OverscriptBox["x", "_"]]]

Documentation for ParsedBoxWrapper[] is comically circular. But it has a Tech Note link to a tutorial that explains everything:

Complex Patterns and Advanced Features

I'm not sure, but I think it is not possible to create a variable with a typeset name like h2o in Wolfram language. If someone knows how, please reply.

POSTED BY: Jay Gourley
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