필터 지우기
필터 지우기

Issue using Auto Differentiation

조회 수: 2 (최근 30일)
Sunetra CV
Sunetra CV 2020년 2월 14일
댓글: Sunetra CV 2020년 2월 14일
I have been facing a problem using AutoDiff. Its showing an error when i try to use the code given in Example 6 in the documentation.
% initialize audi grid
[u,v] = ndgrid(linspace(-pi,pi));
[u,v] = ainit(u,v,2);
% define parametrization of a Klein bottle
r = 2;
x = (r+cos(v/2)*sin(u)-sin(v/2)*sin(2*u))*cos(v);
y = (r+cos(v/2)*sin(u)-sin(v/2)*sin(2*u))*sin(v);
z = sin(v/2)*sin(u)+cos(v/2)*sin(2*u);
S = [x;y;z];
% differential geometry
J = ajac(S); % Jacobian
Error using <=
Matrix dimensions must agree.
Error in audi/sumidx (line 1334)
f =
[find(all(J(1:nchoosek(nn+sum(p)-1,nn),:)<=p,2));i];
Error in audi (line 48)
sumidx(r);
Error in ainit (line 42)
varargout{i} = audi(varargin{i},i,n,k);
  댓글 수: 1
Sunetra CV
Sunetra CV 2020년 2월 14일
Issue resolved. I was using an older version of matlab thats not compatible with the current version of AutoDiff.

댓글을 달려면 로그인하십시오.

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by