Skip to content
Snippets Groups Projects
Commit 34809281 authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Plot the surface as well

parent 83b1b1c3
No related branches found
No related tags found
No related merge requests found
clear all;
if exist('graphics_toolkit','file')
graphics_toolkit('fltk')
end
......@@ -16,11 +18,21 @@ y = scale*sin(t);
z = arrayfun(@(vec1, vec2) J([vec1; vec2]), x, y);
hold on
plot3(x,y,z);
plot3(x,y,z,'k');
title 'scale = 1'
# Minimum taken from test-circle.cc with scale=1
plot3(-1.487905e-01, +9.888687e-01, J([-1.487905e-01; +9.888687e-01]), 'r+');
hold off
x = scale * (-1:.05:1);
y = scale * (-1:.05:1);
[X, Y] = meshgrid(x,y);
for i=1:length(y)
val(i,:) = arrayfun(@(vec1, vec2) J([vec1; vec2]), X(i,:), Y(i,:));
end
surf(x, y, val)
hold off;
clear all;
if exist('graphics_toolkit','file')
graphics_toolkit('fltk')
end
......@@ -15,7 +17,8 @@ x = scale*cos(t);
y = scale*sin(t);
z = arrayfun(@(vec1, vec2) J([vec1; vec2]), x, y);
plot3(x,y,z);
hold on
plot3(x,y,z,'k');
title 'scale = 10'
......@@ -24,3 +27,14 @@ title 'scale = 10'
line([-5.3444 6.36022],
[8.45206 -7.71671],
[J([-5.3444; 8.45206]) J([6.36022; -7.71671])])
x = scale * (-1:.05:1);
y = scale * (-1:.05:1);
[X, Y] = meshgrid(x,y);
for i=1:length(y)
val(i,:) = arrayfun(@(vec1, vec2) J([vec1; vec2]), X(i,:), Y(i,:));
end
surf(x, y, val)
hold off;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment