24.01.2015 Views

Mathematica Tutorial: Visualization And Graphics - Wolfram Research

Mathematica Tutorial: Visualization And Graphics - Wolfram Research

Mathematica Tutorial: Visualization And Graphics - Wolfram Research

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Visualization</strong> and <strong>Graphics</strong> 113<br />

Importing <strong>Graphics</strong> and Sounds<br />

<strong>Mathematica</strong> allows you not only to export graphics and sounds, but also to import them. With<br />

Import you can read graphics and sounds in a wide variety of formats, and bring them into<br />

<strong>Mathematica</strong> as <strong>Mathematica</strong> expressions.<br />

Import@"name.ext"D<br />

Import@" file"," format"D<br />

ImportString@"string"," format"D<br />

import graphics from the file name.ext in a format deduced<br />

from the file name<br />

import graphics in the specified format<br />

import graphics from a string<br />

Importing graphics and sounds.<br />

In[1]:=<br />

This imports an image stored in JPEG format.<br />

g = Import@"ExampleDataêocelot.jpg"D<br />

Out[1]=<br />

In[2]:=<br />

Out[2]=<br />

This shows an array of four copies of the image.<br />

<strong>Graphics</strong>Grid@88g, g

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!