Variable q5 must be of size [1 2]. It is currently of size [1 1]. Check where the variable is assigned a value.
7 ビュー (過去 30 日間)
古いコメントを表示
syms x y
f(x,y)=x-x*y^2+sqrt(y);
u=[2,9];
q5=dot(u/norm(u),jacobian(f(x,y),[x,y]));
回答 (1 件)
Walter Roberson
2024 年 3 月 14 日
syms x y
f(x,y)=x-x*y^2+sqrt(y);
u = sym([2,9]);
part1 = u/norm(u)
part2 = jacobian(f(x,y),[x,y])
q5 = dot(part1, part2)
You have the dot product of a 1 x 2 and a 1 x 2. The result is going to be 1 x 1. You should not expect anything different for that set of equations.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!