nmue...@gmail.com
unread,May 23, 2013, 3:56:40 AM5/23/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I am trying to create a manipulate interface that would allow a user to enter a set of independent variables and a function of these variables. The program would then return calculations based on partial derivatives of the function with respect to the given variables. Eventually this would lead to an error propagation program for undergraduate physics labs.
This program allows for 2 variables and produces a list of partial derivatives of the function with respect to the variables. It works just fine.
Manipulate[{D[f, var[1]], D[f, var[2]]}, {var[1], x}, {var[2], y}, {f,
x^2 + y^3}]
I would like to extend it to an adjustable number of variables, which I think I can do with nested manipulate commands, but I also need the code to adjust how many derivatives need to be calculated, so I want to replace the list of derivative commands with a Table. I tried this:
Manipulate[
Table[D[f, var[i]], {i, 1, 2}], {var[1], x}, {var[2], y}, {f,
x^2 + y^3}]
This program doesn't work. I suspect that the Table command is somehow causing it to calculate the derivatives before the expressions for the variables and/or function are defined from the manipulate controls. I get the same problem when using Sum or Do commands instead of Table.
Any suggestions would be appreciated.
Thankyou,
Nathan