Code covered by the BSD License  

Highlights from
C++ raw data dumper

image thumbnail
from C++ raw data dumper by sun peng
Dump C++ data into Matlab to make debugging C++ program more easily. Handier than using engine APIs

draw_points (pnts)
function draw_points (pnts)
%DRAW_POINTS
% draw points one by one in a new figure
% usages:
%   draw_points(pnts);
% pnts must be a Mx2 double matrix

M = size(pnts, 2);
if (M~=2 || ~isa(pnts,'double')) 
    error('pnts must be a Mx2 double matrix');
end
hfig = figure;
hax = axes('parent', hfig);
plot(pnts(:,1),pnts(:,2),...
    'parent', hax,...
    'linestyle', 'none',...
    'marker', 'o');
axis('square');
set(hfig, 'name', 'example: view user-defined data type');

Contact us at files@mathworks.com