0
|
5303 Views
|
|
0 Total Likes
View groups...
Share
GROUPS:

# How to use the output of Mathematica in another function?

Posted 10 years ago
 Hi all, may be i wrong with my title words. sorry for my bad english. But here is the thing, I am using the table function to generate a set of values for a steady state function called Np. With this function i will be generating 5 rows and 10 columns of Np values. Table[ solNp2 = NSolve[(dNpdt /. sol) == 0, Np]; Print[solNp2]; Npsteady = Np /. solNp2[[1]], {Datm, 0, 5, 1}, {[Delta], 0, 1, 0.1}] Later on , I need to substitute these Np values in a function Cp = -> ((Np (-160. + 160 *y )) / (Np (-1. + - 2. x )) Normally what i do is, copy and paste the number in another file and substitue each and every Np values every single time, which is quite time consuming. I was wondering if there was any command to shorten this time?
 You may try something like this: values=Table[ solNp2 = NSolve[(dNpdt /. sol) == 0, Np]; Print[solNp2]; Npsteady = Np /. solNp2[[1]], {Datm, 0, 5, 1}, {\[Delta], 0, 1, 0.1}]; ((Np (-160. + 160 *y )) / (Np (-1. + - 2. x ))/.values