home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / math / 9390 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.5 KB

  1. Path: sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!silverblue.fac.cs.cmu.edu!lrf
  2. From: lrf@silverblue.fac.cs.cmu.edu (Lee Furnival)
  3. Newsgroups: sci.math
  4. Subject: Mathematica Help
  5. Message-ID: <1992Jul21.222351.160911@cs.cmu.edu>
  6. Date: 21 Jul 92 22:23:51 GMT
  7. Article-I.D.: cs.1992Jul21.222351.160911
  8. Distribution: usa
  9. Organization: School of Computer Science, Carnegie Mellon
  10. Lines: 28
  11. Nntp-Posting-Host: silverblue.fac.cs.cmu.edu
  12.  
  13.  
  14. I am having trouble with this small part of a mathematica function I am
  15. writing, maybe someone here can help...
  16.  
  17. I want to define a vector, call it v*, such that the components of v*
  18. are defined by the partial derivatives of a group of other functions.
  19. Here is what the code looks like at this point:
  20.  
  21.     While [i < n,
  22.         v*[[i]] = D[f[x1,x2,...,xn],x[[i]]];
  23.         i++ ]
  24.  
  25. So, what I WANT this part do (but it doesn't) is give me this: 
  26.     
  27.     v* = {(dx1/dx1,dx2/dx1,...,dxn/dx1),...,(dx1/dxn,dx2,dxn,...,dxn,dxn)}
  28.  
  29. but when I try to execute the While loop, I get back something like
  30. "v* not assigned an immediate value".  To solve this, I have tried to define
  31. v* before the loop by using Array and Table, but I still get the same thing.
  32. My problem is that I want some way of indexing v* in the While loop so
  33. that its components can be defined as the loop iterates.
  34.  
  35. I don't know if this makes any sense, so if you have any questions or know
  36. exactly what I am talking about, then please e-mail me!
  37.  
  38. Lee Furnival
  39. lrf@silverblue.fac.cs.cmu.edu
  40.   
  41.