clear all
clc
%控制影像偏微分
syms Xs t Xp Yp Ys;
f=(cos(t)*(Xp-Xs)-sin(t)*(Yp-Ys))/(sin(t)*(Xp-Xs)+cos(t)*(Yp-Ys));
simplify(diff(f,Xs))
%查詢影像偏微分
syms xb a xp yp yb;
h=(cos(a)*(xp-xb)-sin(a)*(yp-yb))/(sin(a)*(xp-xb)+cos(a)*(yp-yb));
simplify(diff(h,xb))
請問
這兩個偏微分結果怎麼會不一樣呢
對應關係如下
Xs <-> xb
Ys <-> yb
Xp <-> xp
Yp <-> yp
t <-> a
f結果如下
(sin(t)*(cos(t)*(Xp - Xs) - sin(t)*(Yp - Ys)))/(cos(t)*(Yp - Ys) + sin(t)*(Xp
- Xs))^2 - cos(t)/(cos(t)*(Yp - Ys) + sin(t)*(Xp - Xs))
h結果如下
cos(a)/(cos(a)*(yb - yp) + sin(a)*(xb - xp)) - (sin(a)*(cos(a)*(xb - xp) -
sin(a)*(yb - yp)))/(cos(a)*(yb - yp) + sin(a)*(xb - xp))^2
到底為什麼不一樣= _=