🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.math.symbolic
Article #1091

A Mathematica question.

#1091
From: Jeffrey C. Kantor
Date: Tue, 02 Aug 1988 15:22
19 lines
1205 bytes
After spending the weekend doing Mathematica, I thought I would post a
simple question.  Suppose you want to replace every element of a list
with a corresponding element of another list, i.e.,

expr /. {a,b,c,d}->{1,2,3,4}  (NOTE: NOT A VALID STATEMENT)

where -> works on an element-by-element basis.  What is the most efficient
way of doing this?  I hacked together a rather messy bit of code that is
not very efficient.  I was looking for a one-liner.

This came up when trying to get the RungeKutta Notebook to work for a system
of ODE's rather than a single ODE.


-- 
Jeff Kantor                      US Mail:  Department of Chemical Engineering
                                           University of Notre Dame
    uucp:  iuvax!ndmath!ndcheg!jeff        Notre Dame, IN   46556  USA
internet:  jeff@ndcheg.cheg.nd.edu
Technical Details
Message-ID: <605@ndcheg.cheg.nd.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!iuvax!ndcheg!jeff

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!iuvax!ndcheg!jeff
From: jeff@ndcheg.cheg.nd.edu (Jeffrey C. Kantor)
Newsgroups: sci.math.symbolic,comp.sys.mac
Subject: A Mathematica question.
Keywords: help
Message-ID: <605@ndcheg.cheg.nd.edu>
Date: 2 Aug 88 15:22:39 GMT
Organization: Dep't of Chemical Eng., Univ. of Notre Dame
Lines: 18