Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 12th, 2012  |  syntax: None  |  size: 0.33 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. MATLAB 4D (3d   color) plot with animation
  2. X=1:30;Y=randperm(30);Z=ones(size(X));
  3. voltage_matrix = ...; %# 30 by 133
  4. cdata = voltage_matrix;
  5. handle = scatter3(X,Y,Z);
  6.  
  7. colormap('jet')
  8. set(gca,'clim',[min(voltage_matrix) max(voltage_matrix)])
  9.  
  10. for t=1:size(cdata,2) %# 1 to 133
  11.     set(handle, 'cdata', cdata(:,t));
  12.     pause(.1)
  13. end