MATLAB Script:
close all
clear
clc
syms x1 x2 x3 x4
f1(x1,x2,x3,x4) = 1*x1 + 2*x2^2 + 3*x3*x4 + 4*x4^3;
f2(x1,x2,x3,x4) = 2*x1*x2 + 3*x2*x3 + 4*x3^2 + 5*x4;
f3(x1,x2,x3,x4) = 3*x1^3 + 4*x2 + 5*x3^2 + 6*x4*x1;
f = [f1; f2; f3]
x = [x1; x2; x3; x4]
J = Jcb(f, x)
function J = Jcb(f, x)
J = [];
for i = 1:length(x)
J = [J diff(f, x(i))];
end
end
Output:
Get Answers For Free
Most questions answered within 1 hours.