# HG changeset patch # User Ben Abbott # Date 1327273006 18000 # Node ID 4e6436a60b624a712839beecad1146769f617cb7 # Parent 27abe77158d6142f80e73d9df2210f770c1394aa Changes to allow plot demos to be run under Matlab. * hold.m, legend.m diff --git a/scripts/plot/hold.m b/scripts/plot/hold.m --- a/scripts/plot/hold.m +++ b/scripts/plot/hold.m @@ -136,7 +136,7 @@ %! z = peaks (x, y); %! contourf (x, y, z, 10); %! hold on; -%! plot (vec (x), vec (y), '^'); +%! plot (x(:), y(:), '^'); %! patch ([-1.0 1.0 1.0 -1.0 -1.0], [-1.0 -1.0 1.0 1.0 -1.0], 'red'); %! xlim ([-2.0 2.0]); %! ylim ([-2.0 2.0]); diff --git a/scripts/plot/legend.m b/scripts/plot/legend.m --- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -1037,7 +1037,7 @@ %! for i = 1:5 %! h = plot (1:100, i + rand(100,1)); hold on; %! set (h, 'color', colororder(i,:)); -%! labels = {labels{:}, cstrcat('Signal ', num2str (i))}; +%! labels = {labels{:}, ['Signal ', num2str(i)]}; %! end %! hold off; %! title ('Signals with random offset and uniform noise'); @@ -1052,7 +1052,7 @@ %! for i = 1:5 %! h = plot (1:100, i + rand (100,1)); hold on; %! set (h, 'color', colororder(i,:)); -%! labels = {labels{:}, cstrcat('Signal ', num2str (i))}; +%! labels = {labels{:}, ['Signal ', num2str(i)]}; %! end %! hold off; %! title ('Signals with random offset and uniform noise');