このコードの実行に問題があり、このエラーが発生します
Error using ^ 入力はスカラーおよび正方行列でなければなりません。要素ごとの POWER を計算するには、代わりに POWER (.^) を使用します。
cal_path のエラー (149 行目) f=z-(2*(1+sqrt(1-Cx^2*y^2))*(Cx*x^2+Cy*y^2)-Cx*Cy^2 *(x^2+y^2)*y^2)./(1+sqrt(1-Cx^2*y^2))*((1+sqrt(1-Cx^2*y^2) )...
これは私のコードです
Cx=1/25;
Cy=1/10
syms x y z
f=z-(2*(1+sqrt(1-Cx^2*y^2))*(Cx*x^2+Cy*y^2)-Cx*Cy^2*(x^2+y^2)*y^2)./(1+sqrt(1- Cx^2*y^2))*((1+sqrt(1-Cx^2*y^2))+sqrt((1+sqrt(1-Cx^2*y^2))^2-Cx*(2*1+sqrt(1-Cx^2*y^2)*(Cx*x^2+Cy*y^2)-Cx*Cy^2*(x^2+y^2)*y^2)));
%the function of the surface F(x,y,z)=0%
diff(f,x); % calculate the differential of x
diff(f,y); % calculate the differential of y
diff(f,z); % calculate the differential of z