MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Structure modification and related questions


Hello,

I am working with a big structure (actually, it is a list), like

x=Table[i, {i,10000}]

Q.1) Can I modify x[[3]], let's say, without having to create another
list of 10000 elements? (the obvious thing for me to try, x[[3]]=0,
does not work).

Q.2) In the same spirit, are there any functions similar to Insert and
Delete, that modify directely the expression affected by them, without
taking a whole copy?

Q.3) Related to Q.1&2, is it possible in Mathematica that two structures
(or lists, for that sake) have some parts in common? What I mean by
this is that, for example, I would like to have the variable x equal to
the second element of {1,{2,3},4}, so that in case the 3 is changed by
a 5 in one of them, it is also changed in the other one.

Thank you for any help you can give me on this

Roberto Moriyon

--

Roberto Moriyon
Departamento de Ingenieria Informatica Universidad Autonoma de Madrid
28049 Madrid

Phone: +34-91-397-4350
Fax: +34-91-397-5277



  • Prev by Date: Spatial statistics and NonlinearRegress
  • Next by Date: how can i save a text from noteboook ?
  • Previous by thread: Spatial statistics and NonlinearRegress
  • Next by thread: Re: Structure modification and related questions