Skip to content

Instantly share code, notes, and snippets.

@neurojojo
Created April 22, 2022 21:53
Show Gist options
  • Save neurojojo/1a49b83d8c20c2d9c680ac3449c261aa to your computer and use it in GitHub Desktop.
Save neurojojo/1a49b83d8c20c2d9c680ac3449c261aa to your computer and use it in GitHub Desktop.
% Example x,y,z
x = [-15:1:1];
y = sin(x/2);
z = (x/10).^3;
figure('color','w'); plot3(x,y,z,'o-','markersize',8,'color',[1,.5,.5],'linewidth',2,'markerfacecolor','k'); grid on
coords_tbl = array2table([x',y',z']);
zlims = get(gca,'ZLim')
set(gca,'nextplot','add','linewidth',1);
rowfun( @(x,y,z) plot3([x,x],[y,y],[zlims(1),z],'.-','color',[0,0,0,1]), coords_tbl )
plot3(x,y,repmat(zlims(1),numel(x),1),'color',[0,0,0,0.1],'linewidth',4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment