Skip to content

Commit e9757e6

Browse files
author
Ross Hatton
committed
Debugged display of curvdef systems and calculation of optimal coordinates in the presence of singularities
1 parent f5ca67e commit e9757e6

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

ProgramFiles/sys_calcpath_fcns/integrate_cBVI.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@
3939
,struct('method','gauss','tol',1e-6))...
4040
,(1:n_g)');
4141

42-
catch
42+
catch
4343

44-
warning('Gait curve not sufficiently convex for simple integration. Specify either ''delaunay'' or ''section'' in p.complex_curve{i} to invoke that integration method')
45-
44+
if numel(s.grid.eval) == 2
45+
warning('Gait curve not sufficiently convex for simple integration. Specify either ''delaunay'' or ''section'' in p.complex_curve{i} to invoke that integration method')
46+
end
4647
end
4748

4849
else

ProgramFiles/sys_calcsystem_fcns/optimize_coordinate_choice.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
% optimization
3232
if isfield(s,'coordinate_optimization_weighting_function')
3333

34-
weight = s.coordinate_optimization_weighting_function(s.grid.eval{:});
34+
weight = s.coordinate_optimization_weighting_function(s.grid.finite_element{:});
3535

3636
elseif s.singularity
3737

38-
weight = weight_away_from_singularities(s.vecfield.eval.singularities, s.grid.eval);
38+
weight = weight_away_from_singularities(s.vecfield.eval.singularities, s.grid.finite_element);
3939

4040
else
4141
weight = ones(size(s.grid.finite_element{1}));
@@ -200,7 +200,7 @@
200200
if s.singularity
201201

202202
for i = 1:numel(s.vecfield.display.content.Avec_optimized)
203-
s.vecfield.display.content.Avec_optimized{i} = s.vecfield.display.content.Avec_optimized1{i} .* (1-s.vecfield.display.singularities{i});
203+
s.vecfield.display.content.Avec_optimized{i} = s.vecfield.display.content.Avec_optimized{i} .* (1-s.vecfield.display.singularities{i});
204204
end
205205

206206
end

ProgramFiles/sys_draw_fcns/illustrate_shapespace.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function illustrate_shapespace(system,target)
1515
% the components of the grid are in a column cell array to avoid any
1616
% row/column problems below
1717
paramgrid = visual.grid(:);
18-
n_dim=size(visual.grid,1);
18+
n_dim=numel(visual.grid);
1919
test2=cell(1,n_dim-1);
2020
test3=cell(1,n_dim-2);
2121
test2{1}=1;

UserFiles/GenericUser/Systems/curv_triangle_wave_two_periods.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% (258094553458734611*sign((a1*cos(4*s*pi) + a2*sin(4*s*pi))/(a1^2 + a2^2)^(1/2))*abs(a1*cos(4*s*pi) + a2*sin(4*s*pi))^20*(a1^2 + a2^2)^(1/2))/(72057594037927936*abs(a1^2 + a2^2)^10)
1+
% (516189106917469267*sign((a1*cos(4*s*pi) + a2*sin(4*s*pi))/(a1^2 + a2^2)^(1/2))*abs(a1*cos(4*s*pi) + a2*sin(4*s*pi))^20*(a1^2 + a2^2)^(1/2))/(144115188075855872*abs(a1^2 + a2^2)^10)
22
function output = curv_triangle_wave_two_periods(params,mode)
33

44
% Turn params into a cell matrix

UserFiles/GenericUser/Systems/sysf_three_link_kinematic.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
%densities for various operations
6868
s.density.vector = [10 10]; %density to display vector field
6969
s.density.scalar = [30 30]; %density to display scalar functions
70-
s.density.eval = [20 20]; %density for function evaluations
71-
s.density.finite_element=31;
70+
s.density.eval = [30 30]; %density for function evaluations
71+
s.density.finite_element=30;
7272

7373
%%%
7474
%Display parameters

0 commit comments

Comments
 (0)