solve関数で簡単な数式を解く方法
Afficher commentaires plus anciens
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が空になります。
原因と対処法を教えていただけましたら幸いです。
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 数値ソルバー dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!