clear all; close all; clc;

t = 0:0.0001:1;
x = sin(2*pi*50*t);
Koeff  = cwt(x,1:500,'morl');
freq = scal2frq(1:500,'morl',0.0001);   

% figure(1);
% p1 = plot(t,x);
% set(p1,'LineWidth',3,'LineStyle','-')
% Dateiname1 = 'TestPlot1'
% % Als PDF speichern
% print ('-dpdf', Dateiname1)
% % als EPS speichern
% orient portrait % Seitenausrichtung für PDF
% print ('-depsc2', Dateiname1)
% % als PNG speichern
% print ('-dpng', Dateiname1)
% % Als MatLab - Figure speichern
% saveas (gcf, Dateiname1) % Oeffnen mit "open hammer .fig" oder "figure ->file -> open



figure(2);
hold on
p2 = contour(t,freq,sqrt(abs(Koeff)),8);
p3 = plot(t,50);
hold off
set(p3,'LineWidth',3,'LineStyle','-')
axis tight
Dateiname2 = 'TestPlot2'

% Als PDF speichern
print ('-dpdf', Dateiname2)
% als EPS speichern
orient portrait % Seitenausrichtung für PDF
print ('-depsc2', Dateiname2)
% als PNG speichern
print ('-dpng', Dateiname2)
% Als MatLab - Figure speichern
saveas (gcf, Dateiname2) % Oeffnen mit "open hammer .fig" oder "figure ->file -> open