Function to Linear equation with string input

2 vues (au cours des 30 derniers jours)
Troels Gramstrup
Troels Gramstrup le 29 Août 2015
Hello.
I would like to make a function which can give the result of a linear equation system with 2 equations and 2 unknown. The function should receive 2 parametres for which every parameter is a string which contain a equation.
Like: y=2x+1 y=3x-2
The function should be like: Functionname('y=2x+1'.'y=3x-2') and should give result like a string with the result like 'x=3, y=7'
Both equation should be like the form of y=ax+b or y=ax-b
Anyone who can me?
  3 commentaires
dpb
dpb le 29 Août 2015
Alternatively, you could modify your goals a little and given that you have a fixed format for the equations simply enter the numeric coefficients of the terms and build the resulting system knowing the form. Somewhat easier first task; get that working then can expand on the knowledge gained there in Matlab to enhance the user interface...
Star Strider
Star Strider le 29 Août 2015

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 29 Août 2015

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by