diff --git a/set_initial_conditions.m b/set_initial_conditions.m index bc60648..b43d0d6 100644 --- a/set_initial_conditions.m +++ b/set_initial_conditions.m @@ -8,5 +8,7 @@ switch i q0 = [0; 0; pi/6]; case 3 q0 = [1; 0; 0]; + case 4 + q0 = [1; 0; -pi/6]; end end \ No newline at end of file diff --git a/set_trajectory.m b/set_trajectory.m index e72a936..1804afc 100644 --- a/set_trajectory.m +++ b/set_trajectory.m @@ -41,6 +41,10 @@ switch i case 10 xref = cos(0.5*s); yref = 0.5 * sin(s); + case 11 + a = 0.5; + xref = 2*a*(1-cos(0.5*s))*sin(0.5*s); + yref = 2*a*(1-cos(0.5*s))*cos(0.5*s); end ref = [xref; yref]; diff --git a/tesiema.m b/tesiema.m index 06a6127..7e7a438 100644 --- a/tesiema.m +++ b/tesiema.m @@ -15,11 +15,13 @@ for i = 1:s_(2) TEST = convertStringsToChars(TESTS(i)) sim_data = load(['tests/' TEST '/common.mat']); + sim_data.q0 = set_initial_conditions(sim_data.INITIAL_CONDITIONS); [ref dref] = set_trajectory(sim_data.TRAJECTORY); sim_data.ref = ref; sim_data.dref = dref; + spmd (3) worker_index = spmdIndex; data = load(['tests/' TEST '/' num2str(spmdIndex) '.mat']); @@ -33,7 +35,7 @@ for i = 1:s_(2) disp('Done') end - h = [] + h = []; s1_ = size(worker_index); for n = 1:s1_(2) h_ = figure('Name', [TEST ' ' num2str(n)] ); @@ -78,6 +80,10 @@ function [t, q, ref_t, U, U_track, U_corr] = simulate_discr(sim_data) U_track = u_track'; for n = 1:steps + sim_data.old_u_corr = u_corr; + sim_data.old_u_track = u_track; + sim_data.old_u = u_discr; + tspan = [(n-1)*tc n*tc]; z0 = q(end, :);