Vector equation with two unknowns

조회 수: 4 (최근 30일)
Karl Persson
Karl Persson 2018년 12월 5일
편집: madhan ravi 2018년 12월 5일
Hi!
I am new to matlab and have this problem:
[ -1 0 0 ]*V == [ 0 -1/3 0 ] + [ -4 4 0 ]*W
How do I code this to find V and W?

채택된 답변

madhan ravi
madhan ravi 2018년 12월 5일
편집: madhan ravi 2018년 12월 5일
Read about solve() and vpasolve()
syms V W
[V,W]=solve([ -1 0 0 ]*V == [ 0 -1/3 0 ] + [ -4 4 0 ]*W,V,W)
Command window:
>> COMMUNITY
V =
1/3
W =
1/12
>>

추가 답변 (1개)

John D'Errico
John D'Errico 2018년 12월 5일
syms V W
VW = solve([ -1 0 0 ]*V == [ 0 -1/3 0 ] + [ -4 4 0 ]*W)
VW =
struct with fields:
V: [1×1 sym]
W: [1×1 sym]
>> VW.V
ans =
1/3
>> VW.W
ans =
1/12

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by