How can I operate a matrix by a vector?

1 回表示 (過去 30 日間)
Jerson García
Jerson García 2021 年 9 月 25 日
回答済み: KSSV 2021 年 9 月 26 日
Hi, I need nelp.
I need to perform the following function f (x) = || Ax - b || ^ 2
A = [2 3, 1-2, 4 1];
b = [2,4, -5];
syms x1 x2
x = [x1 x2];
(sqrt ((A * x-b) ^ 2)) ^ 2

採用された回答

KSSV
KSSV 2021 年 9 月 26 日
A = [2 3 ; 1 -2 ; 4 1];
b = [2,4, -5]';
syms x1 x2
x = [x1 ; x2];
f = (sqrt ((A * x-b) .^ 2)) .^ 2
f = 

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by