b0 = c0+3*c1 b1 = c0-5*c1 unknowns are c0 c1. b0,b1 are non variables which should appear in the solution.
thank you david

 Akzeptierte Antwort

Star Strider
Star Strider am 23 Aug. 2018

0 Stimmen

Using the Symbolic Math Toolbox:
syms b0 b1 c0 c1
Eq1 = b0 == c0+3*c1;
Eq2 = b1 == c0-5*c1;
[c0,c1] = solve(Eq1, Eq2)
produces:
c0 =
(5*b0)/8 + (3*b1)/8
c1 =
b0/8 - b1/8

4 Kommentare

david edwards jr
david edwards jr am 23 Aug. 2018
thank you! my next question is to create a file that contains the above that I can call with solve. I can understand how to select the directory that the file is to be in. it is the structure of the file that I need to know.
again thank you
david
Star Strider
Star Strider am 23 Aug. 2018
My pleasure.
I have no idea what you want to do, or the question you are actually asking.
david edwards jr
david edwards jr am 23 Aug. 2018
thank you! I have a set of equations and a set of variables (c0.c1...) and a set of constants (b0,b1...) and I needed to make a file that mathlab could call. I saw that what I needed is to create a file test.m with the operations as you suggested. this seems to work with 35 equations and 35 variables.
thank you for taking the time to respond. it was the key for me getting matlab working at all. after than it was downhill.
again appreciate your help. david
Star Strider
Star Strider am 23 Aug. 2018
My pleasure.
If my Answer helped you solve your problem, please Accept it!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

david edwards jr
david edwards jr am 23 Aug. 2018

1 Stimme

it is accepted!!! david

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by