Why won’t my cycles overlap properly?
%this code works but not the way i want it, the cycles are supposted to overlap more symmetrically but three of them are longer than the rest
subplot(2,2,3);
hold on;
max_length = max(cellfun(@length, cycle_flows));
for i = 1:length(cycle_flows)
x = 1:max_length;
y = NaN(1, max_length); % Initialize with NaNs
y(1:length(cycle_flows{i})) = cycle_flows{i};
plot(x, y);
end
hold off;%this code works but not the way i want it, the cycles are supposted to overlap more symmetrically but three of them are longer than the rest
subplot(2,2,3);
hold on;
max_length = max(cellfun(@length, cycle_flows));
for i = 1:length(cycle_flows)
x = 1:max_length;
y = NaN(1, max_length); % Initialize with NaNs
y(1:length(cycle_flows{i})) = cycle_flows{i};
plot(x, y);
end
hold off; %this code works but not the way i want it, the cycles are supposted to overlap more symmetrically but three of them are longer than the rest
subplot(2,2,3);
hold on;
max_length = max(cellfun(@length, cycle_flows));
for i = 1:length(cycle_flows)
x = 1:max_length;
y = NaN(1, max_length); % Initialize with NaNs
y(1:length(cycle_flows{i})) = cycle_flows{i};
plot(x, y);
end
hold off; plotting, student MATLAB Answers — New Questions