Loops
Christopher Creutzig and
Walter Oevel
Additional contact information
Christopher Creutzig: Universität Paderborn, Fakultät EIM-M
Walter Oevel: SciFace Software GmbH & Co.KG
Chapter 16 in MuPAD Tutorial, 2004, pp 291-294 from Springer
Abstract:
Abstract Loops are important elements of MuPAD’s programming language. The following example illustrates the simplest form of a for loop: » for i from 1 to 4 do x:= i ^2; print(″The square of″ i, ″is″, x) end_for: ″The square of″, 1, ″is″, 1 ″The square of″, 2, ″is″, 4 ″The square of″, 3, ″is″, 9 ″The square of″, 4, ″is″, 16 The loop variable i automatically runs through the values 1, 2, 3, 4. For each value of i, all commands between do and end_for are executed. There may be arbitrarily many commands, separated by semicolons or colons. The system does not print the results computed in each loop iteration on the screen, even if you terminate the commands by semicolons. For that reason, we used the print command to generate an output in the above example.
Date: 2004
References: Add references at CitEc
Citations:
There are no downloads for this item, see the EconPapers FAQ for hints about obtaining it.
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:spr:sprchp:978-3-642-59304-8_16
Ordering information: This item can be ordered from
http://www.springer.com/9783642593048
DOI: 10.1007/978-3-642-59304-8_16
Access Statistics for this chapter
More chapters in Springer Books from Springer
Bibliographic data for series maintained by Sonal Shukla () and Springer Nature Abstracting and Indexing ().