Importing and Visualizing Data, Images, and Audio
Back to Portal
Introduction
You can import data from many different types of files, including
text files and spreadsheets
images
audio
and more
Additionally, if your Maple worksheet is saved as a Workbook, you can attach your data file to the Workbook; this means you only have to manage one file on your computer, not several.
Import and Plot Data from Excel
data≔ExcelTools:−Importcatkerneloptsdatadir,/Excel/ExperimentalData.xls,Experimental,A2:B12:
plotdata
Import, Play, and Visualize Audio
Here, we import and play audio, and then generate a spectrogram and periodogram of its frequency contents.
The audio is imported as an array of data.
audioFile≔AudioTools:- Readcatkernelopts⁡datadir,/audio/maplesim.wav
audioFile≔?
This data can be manipulated and further explored using tools from the AudioTools and SignalProcessing packages.
AudioTools:-PlayaudioFile
Spectrogram and Power Spectrum of an Audio File
withSignalProcessing:
Spectrogram⁡audioFile,size=800,200
PeriodogramaudioFile,size=800,200
Import and Display an Image
img≔ImageTools:-Readcatkerneloptsmapledir,/data/images/worldmap.jpg
ImageTools:-Embedimg
Import Data Assistant
Rather than writing commands to import data, you can also use the Import Data assistant from the Tools > Assistants menu.
Applications
Identifying Periodicity of Sunspots
El Centro Earthquake Analysis
System Identification
Spectrograms
PV Diode Parameter Estimation
Download Help Document