# How do I replace a list of values in a expression automatically?

Posted 9 years ago
11114 Views
|
8 Replies
|
1 Total Likes
|
 Hi..So, I have some values generated with the 'table' command...and i wanted to substituent those values in another eqn.. I could do it manually... but it will take a lot of time.. and I was wondering if there was any command to simplify it..? may be the picture below helps me to explain what i want to do..and so.. here i have a list of NP values, that I need to substitue in the eqn, for example..C = Np / Np + Gso i get a list of C values too.. I was only wondering if there was any command for it..?Any help would be great...Thanks in advance
8 Replies
Sort By:
Posted 9 years ago
 Actually i dint understand what u meant last time with pasting images..i thought it was more precise to my ask questions.. ill try writing it next time
Posted 9 years ago
 Ash Ash, Instead of pasting images, it is courteous to your responders to use the code format indicated by the <> icon at the top. It is also a good idea to give a more descriptive heading to your question. The posting guidelines do not take very long to read, And, as a reminder: http://community.wolfram.com/groups/-/m/t/410406?p_p_auth=QVKKo4iL
Posted 9 years ago
 May be i am not clear enough with the question.. forget the C formula i pasted..But what i want to do it substitute this series Np values in another equation another equation C= (x+y+ Np)/ ( k* L ) . where x,y,k and L are known parameters.. so basically for every Np value i get a C.
Posted 9 years ago
 you can just get your Np values like so: x = ... y = ... k = ... L = ... Np = Table[Np /. solNp2,{...}] c = (x+y+Np) / (k*L) Note that you have to use a small letter c, C is a reserved varable.
Posted 9 years ago
 Thanks it worked...
Posted 9 years ago
 Yes there is, i wrote it for you: it is /. see my response above...Why do you want Np/Np ? =1 ?
Posted 9 years ago
 To get the actual values for Np evaluate the table of:Np /. solNp2 rather than just Np2now you can do basic arithmetic on those values.
Posted 9 years ago
 Hi Sander,, Thanks for the suggestion... but actually my question was to know if there was a command to substitute that derived of Np values in another equation C and get a series sf C value corresponding to the Np values..