Community Tip - You can change your system assigned username to something more personal in your community settings. X
I'm trying to solve multiple unknowns using solve blocks but they don't seem to work. Is there another way to do this?
The first three equations you use in the solve block all suffer from the same problem:
The left hand side is a scalar, a single value, but the right hand side is a 15 x 1 vector.
A scalar never will equal a vector and so no solution could be found.
What do you actually mean by your equations?
If you meant that the four equations should be fulfilled for every of the 15 values in the vectors, then you could use something like
Yes, the left hand side is a vector and the right hand side still a single scalar, but the zero in this case is also treated as the zero vector and so it would work.
It may be more "legal" to actually use a zero vector on the right hand side. You could do so by multiplying one of the input vectors by zero:
But now the problem is that you actually habe 46 equations and just 4 values you try to solve for. Chances are that there is no solution for this overdetermined system.
You could use "minerr" instead of "find" to let Prime find the values which gives the least overall error:
Hi,
What you need is a parametric solve block that solves the problem for each row of the vector inputs.
Ahh! Sure!
Unfortunately, the obvious idea that the four variables we were looking for should not be scalars but 15-element vectors, too, did not occur to me.
But all that's needed is to make the guess values vectors - otherwise the original solve block equations can remain unchanged! I create the necessary guess vectors by multiplying one of the given vectors (C.R) with zero, creating a 15 element zero vector and then adding the desired guess (1) to make a vector consisting of all 1's.
Instead of Terry's approach which returns a nested vector (15x1 vector with 4x1 vectors as elements) my approach returns a 15x1 vector for each of the four variables.
Which approach is more useful depends on the type of further data processing required.
Prime 10 sheet attached
Of course the guess vectors consisting of all 1's can be created in many different ways.
Her an example:
Prime 9 (!) sheet attached
Hello @CF_10130026,
It looks like you have some responses from some community members. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Community Moderation Team.