Issue using Auto Differentiation
Show older comments
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 Comment
Sunetra CV
on 14 Feb 2020
Answers (0)
Categories
Find more on Surfaces, Volumes, and Polygons in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!