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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by