Message Boards Message Boards

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

Understanding a code.

Posted 3 years ago

Hello, everyone. I try to understand syntaxis of Wolfram and I have some unusual question. I introduce the part of the code, which can measure fractal dimension, bellow:

result = {
  width/#,
  Last@First@ImageLevels@Image[
      BlockMap[Min, ImageData[bin], {#, #}],
      "Bit"]
  } & /@ seq; // AbsoluteTiming

I had some attempts to understand each function in this part of the code, but it was unsuccessful.

POSTED BY: Nikita Natalin
4 Replies

Start from the inner part, triple-click on segments, Wolfram Language will highlight parts, helping you to understand how each segment/part is working. For example, triple-click on ImageData, you see ImageData[bin] will be highlighted, meaning ImageData is acting on bin. Now triple-click BlockMap or any other part, and like this you can figure out what is going on

POSTED BY: Mads Bahrami
Posted 3 years ago

Hi Nikita,

Look at the documentation. One way is to evaluate

??&

??/@

Also take a look at this.

POSTED BY: Rohit Namjoshi

Thank so much, but what do ' #' and '/' and '@' mean in this code? Documentation doesn't have any explaining(

POSTED BY: Nikita Natalin

Totally the opposite, the Documentation has a huge content on those syntaxes. For example: https://reference.wolfram.com/language/guide/Syntax.html

POSTED BY: Mads Bahrami
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