Message Boards Message Boards


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

Posted 9 years ago
8 Replies
1 Total Likes


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..

enter image description here

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

POSTED BY: ash ash
8 Replies
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 BY: ash ash

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:

POSTED BY: W. Craig Carter
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 BY: ash ash

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 BY: Sander Huisman
Posted 9 years ago

Thanks it worked...

POSTED BY: ash ash

Yes there is, i wrote it for you: it is /. see my response above...

Why do you want Np/Np ? =1 ?

POSTED BY: Sander Huisman

To get the actual values for Np evaluate the table of:

Np /. solNp2 rather than just Np2

now you can do basic arithmetic on those values.

POSTED BY: Sander Huisman
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..

POSTED BY: ash ash
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract