0

I want to use:

demand = {1.92,
    2.07,
    2.37,
    2.72,
    2.87}*10^6;

NSolve[SetV == demand[[1]]/(Cpf (1 - χ)), χ]

I want to make a vector of solutions for chi (χ) given each of the demand vector components.

rhermans
  • 36,518
  • 4
  • 57
  • 149
  • Hi, welcome to Mathematica.SE, please consider taking the tour so you learn the basics of the site. Once you gain enough reputation by making good questions you will be able to vote up and down both questions and answers. When you see good ones, please vote them up by clicking the grey triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. As you receive help, try to give it too, by answering questions in your area of expertise. – rhermans Nov 26 '14 at 19:02
  • There are things to do after your question has been answered, but don't rush, you may want stay vigilant some time after you get the first answer as its likely that the best approaches may come later improving over a previous reply. Therefore, its a good idea to wait 24hours before voting the deserving answers and accepting the best one for you. (Links contain useful information)) – rhermans Nov 26 '14 at 19:02
  • This is covered in this answer to the "Pitfalls" question. I would also suggest that you do not want to make x = #, because then you cannot use x to represent an indeterminate variable in your equation. Save the resulting rule in a variable like xsol and use it as shown in the linked answer. When you get used to it, it can be convenient. – Michael E2 Nov 26 '14 at 19:21

2 Answers2

1

Simple replace should do the trick

χ /. {{χ -> (-1.92`*^6 + Cpf SetV)/(Cpf SetV)}}

Yields

{(-1.92*10^6 + Cpf SetV)/(Cpf SetV)}
Sjoerd C. de Vries
  • 65,815
  • 14
  • 188
  • 323
John Morganthau
  • 244
  • 1
  • 5
1
χ /.    First[NSolve[SetV == #/(Cpf (1 - χ)), χ]] & /@ demand

or equivalently

χ /. First@Solve[SetV == dem/(Cpf (1 -χ)), χ]
(-dem + Cpf SetV)/(Cpf SetV)

and now

(-# + Cpf SetV)/(Cpf SetV)& /@ demand
{(-1.92*10^6 + Cpf SetV)/(Cpf SetV), (-2.07*10^6 + Cpf SetV)/( Cpf SetV), (-2.37*10^6 + Cpf SetV)/( Cpf SetV), (-2.72*10^6 + Cpf SetV)/( Cpf SetV), (-2.87*10^6 + Cpf SetV)/(Cpf SetV)}
rhermans
  • 36,518
  • 4
  • 57
  • 149