
%% Sobolset
% Construct 1-dim Sobolset p; see Matlab Documentation for details
p=sobolset(1)

% Retrieve first 100 elements of p in form of column vector (or 100 x d
% matrix for d-dimensional Sobolsets)
net(p,100)


%% Plotting
% Creates equally spaced vector x running from 0 to 2 with 1000 entries
x=linspace(0,2,1000);

% Componentwise function on x
y=x.^2
plot(x,y)

% use to create multiple graphs in one plot; always use in conjunction with
% hold off!
hold on

z=x.^0.5
% Colour tag to plot "green" graph, see Manual for other colours
plot(x,z,'g')
hold off



y=rand(1000,1)

% use scatter if you want plots of unconnected dots
scatter(x,y)
% tags for green colour and small dots instead of circles
scatter(x,y,'g','.')

% adds text to existing graph, achored at (2/1) with respect to to the
% coordinate system
text(2,1,'hallo')

% 3rd input argument must be string
text(2,1,13)
??? Error using ==> text
String argument expected after 2 or 3 numeric arguments

text(2,1,num2str(13))



clear

%% int function
% create symbolic variable x (no assigned value) 
syms x
int(x^2)



%% Einlesen von Dateien
disp('Matlab-Variablen speichern und laden')
a = [1 2 3];
b = [2 -1];
whos
clear
%% Einlesen von Dateien
disp('Matlab-Variablen speichern und laden')
a = [1 2 3];
b = [2 -1];
whos
%Speichern der Daten
save daten.mat
clear
whos
load('daten.mat')

