how can i solve these linear equation? I am just installed it and having difficulties using matlab

1 visualización (últimos 30 días)
syms a b c x y z
>> eqn1 = [a + b + c == 2200]
>> eqn2 = [ 0.06*a + 0.08*b + 0.09*c == 178]
>> eqn3 = [c == 3*x]
solve(eqn2, a ,b ,c)
ans = struct with fields:
a: [1×1 sym]
b: [1×1 sym]
c: [1×1 sym]

Respuestas (1)

KSSV
KSSV el 30 de Nov. de 2020
s = solve(eqn2, a ,b ,c) ;
a = double(s.a)
b = double(s.b)
c = dpuble(s.c)
s = double(s)
  3 comentarios
KSSV
KSSV el 30 de Nov. de 2020
syms a b c x y z
eqn1 = a + b + c == 2200 ;
eqn2 = 0.06*a + 0.08*b + 0.09*c == 178 ;
eqn3 = c == 3 ;
eqn = [eqn1,eqn2,eqn3]
s = solve(eqn, a ,b ,c)
a = double(s.a)
b = double(s.b)
c = dpuble(s.c)

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by