Timeline for How to append functions to a list of functions?
Current License: CC BY-SA 3.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 6, 2018 at 15:48 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jan 7, 2018 at 14:56 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Dec 8, 2017 at 13:58 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Nov 8, 2017 at 13:27 | answer | added | Chris Degnen | timeline score: 0 | |
Nov 8, 2017 at 3:48 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Oct 12, 2017 at 11:49 | comment | added | LLlAMnYP |
list2[a_] := List[]; creates a "function" named list2 which, by default, returns List[] . Your For loop then overloads list2 for a specific case where the argument is explicitly a . After running your code then typing list2[a] a result identical to typing list1[a] is returned. Note that the definitions for list2[1] or list2[someotherargument] have not been modified.
|
|
Oct 9, 2017 at 10:36 | comment | added | aardvark2012 | Or this? | |
Oct 9, 2017 at 3:28 | comment | added | aardvark2012 | Have you looked at this? | |
Oct 8, 2017 at 23:00 | answer | added | bill s | timeline score: 1 | |
Oct 8, 2017 at 22:54 | comment | added | RicardoP | I rewrote my question to make it more clear! Thank you | |
Oct 8, 2017 at 22:54 | history | edited | RicardoP | CC BY-SA 3.0 |
deleted 713 characters in body
|
Oct 8, 2017 at 22:28 | comment | added | bill s |
Your use of Append seems wrong, I think you may mean AppendTo . But honestly, I can't figure out what question you are asking. Can you pare it down to a simple version?
|
|
Oct 8, 2017 at 22:16 | comment | added | RicardoP | Concerning your other question, that is my fault! I thought I hadn't post the question, after some time of no answers and posted it again (I was getting used to this forums quick answers), but people just hadn't seen the question yet. My bad! | |
Oct 8, 2017 at 22:12 | comment | added | RicardoP | Sorry!I was not very clear.In the end I want to have a function which is the sum of other functions.These other functions are built using the vectors I mentioned from the list I input as the first argument and the expression inside the append. All of these are always functions of a. The auxList is the list of these functions. Later I would want to define another function which is the sum of each of auxList elements. And this last function is still a function of "a".Before defining this last function,I used auxList[1] to see if it substituted the variable "a by one but return the empty brackets | |
Oct 8, 2017 at 22:11 | comment | added | aardvark2012 | And how does this question differ from this one? | |
Oct 8, 2017 at 22:06 | history | edited | RicardoP | CC BY-SA 3.0 |
deleted 172 characters in body
|
Oct 8, 2017 at 21:56 | comment | added | aardvark2012 |
Without more info about your argument list I can't figure out what your function is trying to do. But does With[{list = Table[i a, 5]}, Table[c1* ArcCos[(list[[i]].list[[i + 1]])/(Norm[list[[i]]]* Norm[list[[i + 1]]])], {i, Length[list] - 1}] ] output something like what you're looking for (ie: a list of functions)?
|
|
Oct 8, 2017 at 20:37 | history | asked | RicardoP | CC BY-SA 3.0 |