Skip to content

Ikaruga 2

  • Home
  • About

Archives

  • February 2016
  • November 2015
  • December 2014
  • December 2013
  • October 2013
  • August 2013
  • July 2013
  • October 2012
  • August 2012
  • June 2012
  • October 2011
  • August 2011
  • July 2011
  • June 2011
  • April 2011
  • March 2011
  • February 2011

Tags

AlarmManager Android Android-layout Art AsyncQueryHandler Backpropagation ContentProvider ContentResolver Context-free grammar Cursor CursorLoader Database Dispatcher Emacs FRP fstab Functional Programming Functional Reactive Programming Game theory Grammar parser GTD Health insurance ikaruga IntentService Java LaTeX Linux ListView Live wallpaper LoaderManager mathtype Maxima microsoft word MikTeX NDK Neural network OnTouchListener OpenGL orgmode ReactJS Reminderer Roboelectric Sqlite tethering Thoughts Unit testing video games ViewTreeObserver Windows wine wxMaxima
Skip to content

Ikaruga 2

Technology: Linux and Android

Tag: wxMaxima

Technology

Apply a Function to an Array (List): Maxima

Posted on February 15, 2011 by ikaruga2099

One of the things that I always need to do when I use Maxima (the CAS system, not the car) is apply a function to every item in a list (array). Well, here’s how using the map function:

a: [1, 2, 3, 4, 5];
f(x):=x^2;
map(f,a);

Output:
[1,2,3,4,5]
f(x):=x^2
[1,4,9,16,25]

0
Create a free website or blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy