0
|
11676 Views
|
8 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

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

Posted 10 years ago
 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 + G so 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 10 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 10 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 10 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 10 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 10 years ago
 Thanks it worked...
Posted 10 years ago
 Yes there is, i wrote it for you: it is /. see my response above...Why do you want Np/Np ? =1 ?
Posted 10 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 10 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..
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments