Message Boards Message Boards

GROUPS:

Understanding a code.

Posted 2 months ago
405 Views
|
4 Replies
|
3 Total Likes
|

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.

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

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

Posted 2 months ago

Hi Nikita,

Look at the documentation. One way is to evaluate

??&

??/@

Also take a look at this.

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

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