Skip to content

Commit

Permalink
fix atplot for single element lattices
Browse files Browse the repository at this point in the history
  • Loading branch information
lfarv committed Nov 7, 2024
1 parent 8a0cd72 commit 4d5d0cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions atmat/atplot/atplotsyn.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
'BPM',p5,args{:});

function [xpl,ypl]=setxpl(s,l,xmotif,ymotif)
s=reshape(s,1,[]); % Ensure there is 1 line, even for empty matrices
l=reshape(l,1,[]);
nm=length(xmotif);
xpl=s(ones(nm,1),:)+l(ones(nm,1),:).*xmotif(:,ones(1,length(s)));
ypl=ymotif(:,ones(1,length(s)));
Expand Down

0 comments on commit 4d5d0cc

Please sign in to comment.