Advertisement
Guest User

Untitled

a guest
Feb 26th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. a = t;
  2. b = 1;
  3.  
  4. a/.t->Range[1,5] (*returns: {1,2,3,4,5} *)
  5. b/.t->Range[1,5] (*returns: 1 *)
  6.  
  7. {1, 1, 1, 1, 1}
  8.  
  9. express = t^2; (* OR t, OR 1, OR 3*t+t^2 *)
  10.  
  11. tSet = Range[1,5]
  12. express/.t->tSet
  13.  
  14. express = 1;
  15. express/.t->tSet (* will output just 1, I would like it to be list of ones of length 5 to match tSet *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement