

function retval = Forum (input1, input2)


FigDimXMin=100;
FigDimXMax=1000;
FigDimYMin=100;
FigDimYMax=600;

XDIM=FigDimXMax-FigDimXMin;
YDIM=FigDimYMax-FigDimYMin;

global myCalc;
global Stromdaten_Berechnen



##########################################################################
################            GUI             ##############################

graphics_toolkit qt



h.fg=figure("Name","Bewertung Berechnung 2D nach R-23-1 und VEMF",...
            "units","pixel",...
            "numbertitle","off",...
           "PaperpositionMode","auto",...
            
            "position",[FigDimXMin FigDimYMin FigDimXMax FigDimYMax],...
            "resize", "on");
            

h.print_grafik=uicontrol("style", "pushbutton",...
                         "units", "normalized",...
                         "FontSize",12,...
                         "string","Grafik speichern",...
                         "callback",@update_GUI,...
                         "position",[0.05, 0.05,0.15,0.1]);
 
h.back = uicontrol ("style", "pushbutton",
                                "units", "normalized",
                                "FontSize",12,...
                                "string", "Zurück",
                                "position", [0.25 0.05 0.15 0.1],
                                "callback", @update_GUI); 
                                
                          
#Je nach dem welche Anwendeung subplot oder axes                           

#h.ax=subplot(2,1,1);                                
h.ax=axes("position",[0.05,0.4,0.4,0.5])

t = 0:0.01:(2*pi);
     x = cos(t);
     plot(t,x,'k');
     axis([0 2*pi -1.5 1.5])
     legend('cos(t)','Location','NorthEast')
     
     
                         
guidata(gcf,h);
update_GUI(gcf);  

endfunction

function update_GUI(obj)
   h=guidata(obj);
   replot=false;


   
  switch(gcbo)
    case(h.print_grafik)
       fn=uiputfile("*.jpg");
       print (fn,"-r0");  
      
 
    
    case (h.back)    
    close;  
  
  endswitch
  
  
  
  endfunction
