function ellipse % zeichnet eine Ellipse % Grafikfenster öffnen clf; hold on; axis([-10 10 -10 10]); % Eingabe von Mittelpunkt und Halbachsenlängen [x,y] = ginput(1); plot(x, y,'ro'); H = inputdlg({'a:', 'b:'}); a = str2num(H{1}); b = str2num(H{2}); % Zeichnen der Ellipse t = linspace(0,2*pi); plot(x+a*cos(t), y+b*sin(t));