Skip to content

Instantly share code, notes, and snippets.

@madebyjeffrey
Created September 29, 2011 03:42
Show Gist options
  • Save madebyjeffrey/1249924 to your computer and use it in GitHub Desktop.
Save madebyjeffrey/1249924 to your computer and use it in GitHub Desktop.
Error reading in function file
function [x, y] = graph (varargin)
list = varargin{1};
for i = 2:length(varargin)
cat(1, list, varargin{i});
endfor
x = list(1:rows(list), 1);
y = list(1:rows(list), 2);
x = cat(1, x, x(1));
y = cat(1, y, y(1));
axis([0 100 0 100], "manual", "tic", "square", "equal", "xy");
plot(x, y);
endfunction
octave:60> graph(A,B,C)
ans =
6.1232e-17
6.1232e-17
octave:61> A
A =
0.00000 1.00000 0.00000 1.00000
octave:62> B
B =
0.86603 -0.50000 0.00000 1.00000
octave:63> C
C =
-0.86603 -0.50000 0.00000 1.00000
octave:64> graph(A,B,C)
ans =
6.1232e-17
6.1232e-17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment