Finding varible in equation from vectors.
1 回表示 (過去 30 日間)
古いコメントを表示
I have
x = [1 2 3]
y = [1 2 1]
m = [1 -1 0]
For the equation y = mx +c (linear expression) I want to find c (y intercept) for each. i.e here
1=1*1 + c (equation 1)
2=-1*2 + c (equation 2)
1=0*3 + c (equation 3)
How would I write this as a vectorized code where the values for c are stored in a matrix. Note I want to find c for each equation not for all. I can't use built in functions. I think I have to use ==? It must hold true if there was more equations or there values were changed.
Thanks,
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!