Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi,
For a function which has the factors as vector, how roots can be found.
simple function: f(x)=x^2+c
M.Reza Karimian wrote:
Hi,
For a function which has the factors as vector, how roots can be found.
What exactly do you mean by that? Which factors?
Better you provide a worksheet and attach it to your post.
Dear Werner,
For example the function is
f(x)=a x^2+b x+c
and a,b,c are column vector. a=(1,1,1), b=(0,0,0), c=(-10,-20,-30).
for normal function, the root can be found by root(f(x),x,-10,0). But when function f(x) is column vector, it is not solved.
Thank you for your help.
Regards,
Karimian
M.Reza Karimian wrote:
Dear Werner,
For example the function is
f(x)=a x^2+b x+c
and a,b,c are column vector. a=(1,1,1), b=(0,0,0), c=(-10,-20,-30).
for normal function, the root can be found by root(f(x),x,-10,0). But when function f(x) is column vector, it is not solved.
Thank you for your help.
Regards,
Karimian
At first - please don't crosspost. You have posted your question additionally in two (very old) threads which is in no way disirable.
You would have to define what "root" should mean in the context of a vector function. Guess you have in mind the the outcome should be the null-vector [0;0;0], right?
Mathcad's root function, as the help also states, is for scalar functions with scalar arguments only. So you probaly would have to use a solve block with find().
BTW, are you aware of the fact that, given that x is 3x1 vector (and otherwise your function would not make much sense as it would mean three equations but just one variable), x^2 is a vector and a x^2 would be a scalar product? The same applies to b*x, it would be a scalar, too.
If I am right with my guess you will have to use vectorisation!
I hope the attached file will be of help.