Message Boards Message Boards

0
|
3768 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Nested Loop

Posted 3 years ago

Hello, I have a problem with a while loop in Mathematica. I want to run the whole list "mFromAlice" in the while loop but I dont know how to do that. It works with the first row, which is named x in the problem just for testing. I think that I need to do a nested while loop so that I somehow can "enter" the next row, but how?

enter image description here

4 Replies

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. Images don't help other members to copy your code. Please EDIT your post and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

You can also embed notebook or attach notebook.

enter image description here

POSTED BY: Moderation Team
ascii = {};
Do[
    While[...],
{x,mFromAlice}
];
POSTED BY: Richard Frost
Posted 3 years ago

Crossposted here.

POSTED BY: Rohit Namjoshi
Posted 3 years ago

Hi Fredrik,

Please post code, not images.

Write a function that processes a single value then use Map to map the function over the list. Something like

process[x_] := Block[{q = x, ascii = {}},
  While[ ...];
  FromCharacterCode[ascii]
  ]

process /@ mFromAlice
POSTED BY: Rohit Namjoshi
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