Group Abstract Group Abstract

Message Boards Message Boards

0
|
1.9K Views
|
6 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Multiple expressions in a notebook Do loop

Posted 9 months ago
POSTED BY: Roger Backhus
6 Replies

No semicolons...?:

note = {}
Do[
 DialogInput[
  DialogNotebook[{
    ExpressionCell[Plot[Sin[n x], {x, 0, 2 Pi}], "Output"],
    TextCell["Wavy enough? "],
    Button["Save", DialogReturn[note = {note, n}]],
    DefaultButton["Skip", DialogReturn[]]
    }]
  ],
 {n, 10}]
Flatten@note
POSTED BY: Michael Rogers

To display a plot from a Do loop, simply wrap it in Print:

Do[Print[Plot[x^n, {x, -1, 1}]], {n, 4}]
POSTED BY: Gianluca Gorni

Do[], Scan[] are iterative structures that return no output (well, actually, each returns Null).

Table[], Map[] are iterative structures that return the values computed in each iteration. Perhaps one of them is what you're looking for.

POSTED BY: Michael Rogers
Posted 9 months ago
POSTED BY: Eric Rimbey
Posted 9 months ago

No code. Not worth the effort. English seems to work for most people. You don't understand "looping structure", "single expression", "semi colon", ... ?

POSTED BY: Roger Backhus

Welcome to Wolfram Community!
Please provide your efforts in the form of the Wolfram Language code. This will make it easier for other members to help you. Check several methods available to include your code in the rules http://wolfr.am/READ-1ST

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard