Message Boards Message Boards

0
|
2069 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

A beginner asks what does "Line@Table" do?

Posted 9 years ago

A beginner asks what does "Line@Table" do? I've been reading others code to get a idea how to plot with mathematica. I ran into this construction and can't find what it means. Can someone help? Thanks in advance.

POSTED BY: Cal Page

The @ sign is a shorthand for a couple of square brackets. For example

Line[Table[{n, n + 1}, {n, 1, 5}]]

can be slightly shortened to

Line@Table[{n, n + 1}, {n, 1, 5}]

When using the brackets there is the task of locating the exact end of the expression to embrace, which is error-prone in complicated code.

The @ usage is quite similar to the "\circ" notation that mathematicians use for the composition of functions.

POSTED BY: Gianluca Gorni
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