Solve (a*B) + (c*D) = E without the Symbolic Toolbox
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michael Garvin
am 25 Sep. 2020
Kommentiert: Star Strider
am 28 Sep. 2020
Solve (a*B) + (c*D) = E without the Symbolic Toolbox
where, B, D, & E are all known.
If the Symbolic Toolbox was available it would looke like this:
syms a c
eqn = ((a*B) + (c*D)) / E == 1;
x = solve( eqn );
Any help would be greatly appreciated.
(Available toolboxes include: Image Processing, Signal Processing, & Statistical and Machine Learning
0 Kommentare
Akzeptierte Antwort
Star Strider
am 25 Sep. 2020
This would seem to be homework, and for homework we only give guidance and hints.
I would set it up as an implicit equation (so it equals 0), and use fsolve. To do this, ‘a’ and ‘c’ would have to be parameterized as ‘p(1)’ and ‘p(2)’, and you would have to code it as an anonymous function. .
Weitere Antworten (3)
Walter Roberson
am 25 Sep. 2020
((a*B) + (c*D)) / E == 1
((a*B) + (c*D)) == 1 * E
a*B + c*D == E
a*B == E - c*D
a == (E-c*D) / B
a == E/B - D/B * c
a == (-D/B) * c + (E/B)
Parameterized:
c = t
a = (-D/B) * t + (E/B)
You have one equation in two variables; you are not going to be able to solve for both variables simultaneously.
0 Kommentare
Ivo Houtzager
am 25 Sep. 2020
Bearbeitet: Ivo Houtzager
am 25 Sep. 2020
A = E*pinv([B; D]);
a = A(1);
c = A(2);
0 Kommentare
Steven Lord
am 26 Sep. 2020
This is a generalization of Cleve's simplest impossible problem. Cleve's has B = 1/2, D = 1/2, E = 3.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Formula Manipulation and Simplification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!