I have sets of Diff. Eq. that I'd like to solve symbolically, then substitute in numerical values for some of the symbols. I'd like to store the value for each symbol in a file, e.g., an excel spreadsheet, then substitute these values in once I have the required solutions.
I'm playing with a toy example:
I have a two-column excel file with letters in the first column and numbers in the second. I have an expression that I wanted to substitute into: f = a + b + c + d.
I import the data, s = Import["File.xlsx"], then try to substitute into my equation using a loop:
For[ i=1, i<=4, i++, f = f/.s[[1,i]][[1]]->s[[1,i]][[2]] ] This doesn't seem to work. As far as I can tell, it's the difference between the string in the 1st column of s, ith row, e.g., a, and the variable within f that I want to substitute for.
What is the correct way to do this?