Document
Document
figure;
ax = axes();
grid on;
xlabel('X');
ylabel('Y');
zlabel('Z');
for j = 1:length(k_values)
k_current = k_values(j);
clearpoints(h);
% Loop through the t values and update the animated line for the current
k
for i = 1:length(t)
pause(0.005);
end
pause(0.1);
end
rotate3d on;
figure;
ax = axes();
grid on;
xlabel('X');
ylabel('Y');
zlabel('Z');
for j = 1:length(k_values)
k_current = k_values(j);
clearpoints(h);
% Loop through the t values and update the animated line for the current
k
for i = 1:length(t)
pause(0.005);
end
pause(0.1);
end
rotate3d on;
% Set a constant value for k (you can change this if you want to vary k)
k = 0;
% Create a figure and axes for the 3D plot
figure;
ax = axes();
grid on;
xlabel('X');
ylabel('Y');
zlabel('Z');
for i = 1:length(t)
drawnow;
% Pause briefly to control the animation speed (optional)
pause(0.01);
end
rotate3d on;