Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = importdata('input.txt');
- z = zeros(length(x),4); % x,y,vx,vy
- for i=1:length(x)
- z(i,:)=sscanf(x{i},'position=< %f, %f> velocity=<%f, %f>')';
- end
- N = 10932; % Increase from 1 by trial and error until text appears!
- z(:,1) = z(:,1)+N*z(:,3);
- z(:,2) = z(:,2)+N*z(:,4);
- plot(z(:,1),-z(:,2),'*');
- axis(axis+[-10,10,-10,10]) % makes text easiee to read
Advertisement
Add Comment
Please, Sign In to add comment