How to Solve for x for 20 functions
Show older comments
Hi,
I have 4 column vectors (C,V,B and N), each has 20 intial values and they represent 20 spatial points ([C(i), V(i), B(i), N(i)], [C(i+1),V(i+1), B(i+1), N(i+1)]) and so on. I want to solve for x for each point using this function -> K=[(C(i)+x(i))*(V(i)+x(i))]/[(B(i)-x(i))*(N(i)-x(i))] (K is constant) and then get new values for each row in each vector ( C(i_new)=C(i)+x(i), V(i_new)=V(i)+x(i).....etc) and sort them again in new vectors (C_new, V_new, B_new and N_new)
1- So how can I construct this model? I always get confused when I want to do for loops by numel.
2- I was thinking to use vpasolve to get all x. However, I get 2 answers of x since the functons is second order in x. How can I choose first answer of x and use it later to find my next solutions?
Thnaks
Accepted Answer
More Answers (0)
Categories
Find more on Historical Contests in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!