solve関数で簡単な数式を解く方法
Show older comments
solve関数を使って
2a + 3b = 0
という方程式をa/bについて解きたいです。
つまり
a/b = -(3/2)
の形にしたいです。
以下が、matlab コードです。
clear; clc; close all;
syms a b
assume(a ~= 0)
assume(b ~= 0)
eqn=2*a+3*b==0
ans=solve(eqn,a/b)
これで解くと、ansが空になります。
原因と対処法を教えていただけましたら幸いです。
Accepted Answer
More Answers (0)
Categories
Find more on 数値ソルバー in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!