Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
stats[importdata] - Read Statistical Data from a File
Calling Sequence
stats[importdata](filename, n)
importdata(filename, n)
Parameters
filename
-
name of the file to be read
n
(optional, default=1) number of streams into which to split the file data
Description
Important: The stats package has been deprecated. Use the superseding package Statistics instead.
The function importdata of the stats package reads statistical data from a file.
The data in the file are just a sequence of numbers, separated by spaces or the end of line. They will be processed by a sscanf(..., `%f`).
The character # introduces a comment that ends at the end of that line.
Missing data are represented in the data file by the * character. It will be converted to the keyword missing.
If the number of streams, which is indicated by the parameter n, is one, the data in the file given by filename are returned as an expression sequence. If the number of streams is greater than one then the data in the file are returned as an expression sequence of n lists. The first item in the file goes into the first list, the second item goes into the second list, and so on, until there is an item in each list. The next item in the file then goes at the end of the first list, and so on until the whole file is imported.
More sophisticated data files can be read using readline and sscanf. The function {readdata} is very similar to stats[importdata].
The command with(stats,importdata) allows the use of the abbreviated form of this command.
Examples
where the datafile could contain the following ------------------------
| # this is a comment
| 2 3
| 4 5
| 6 * # one missing data
| # another comment
------------------------
At the end T will be
See Also
readdata, readline, sscanf, Statistics, stats(deprecated)[data], transform(deprecated)[split]
Download Help Document