How can I define parameters and set them equal to each other dynamically?

4 views (last 30 days)
For a high school essay, I have the following problem. I have a set of 24 parameters(defined by the command syms) which take positive real values, and a list of 19 independent algebraic equations that relate to each of those parameters. For the sake of convenience, lets assume my parameters are can be expressed with set {a_n, where 1<=n<=24 }
What I want to determine is the maximum amount of the parameters {a_n} that can have equal value, such that the set of parameters still satisfy the 19 equations. As a result, I need to be able to set every possible permutation of k parameters equal to each other.
Currently, the method I'm brainstorming is to define a vector that contains the set, such as this:
vec = [a, b, c, d, e, f, g, h, i1, j1, k, l, m, z, o, p, q, r, s, t, u,v,w,x,y];
and then use the nchoosek function on the set vec to choose all possible permutations of some size, say size. Then, I loop through all permutations, and manually define size-1 new equations defining two variables as equal to each other.
Then, I plug in the original 19 equations, as well as the size-1 new equations into a solve function to get my answer.
Is there an easier way to set parameters equal to each other?

Answers (1)

埃博拉酱
埃博拉酱 on 28 Oct 2024
If your equations are all linear, try using some linear algebra methods, such as rank.

Categories

Find more on MATLAB in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!