Lösungen der Aufgaben rüberkopiert.
This commit is contained in:
13
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 1/Aufgabe1_c.m
Normal file
13
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 1/Aufgabe1_c.m
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
%Zuweisung der Variablen
|
||||||
|
x = 1;
|
||||||
|
y = 2;
|
||||||
|
z = 3;
|
||||||
|
|
||||||
|
%Speichern des Workspaces
|
||||||
|
save Aufgabe1_c;
|
||||||
|
|
||||||
|
%Löschen der Inhalte aus dem Workspace
|
||||||
|
clear;
|
||||||
|
|
||||||
|
%Erneutes Laden des Workspaces, welches zuvor gepeichert wurde
|
||||||
|
load Aufgabe1_c.mat;
|
||||||
BIN
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 1/Aufgabe1_c.mat
Normal file
BIN
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 1/Aufgabe1_c.mat
Normal file
Binary file not shown.
5
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 1/Aufgabe1_e.m
Normal file
5
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 1/Aufgabe1_e.m
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
%Zuweisung der Matrix x
|
||||||
|
x = [1 2 3; 4 5 6];
|
||||||
|
x'
|
||||||
|
|
||||||
|
%-> x' zeigt die transponierte Matrix in der Kommandozeile an.
|
||||||
27
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 1/Aufgabe1_f.m
Normal file
27
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 1/Aufgabe1_f.m
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
%Zuweisung einer Variable
|
||||||
|
x = 3;
|
||||||
|
fprintf('x = %f\n', x);
|
||||||
|
|
||||||
|
%1. Bildung des Zehnerlogharitmus
|
||||||
|
y = log10(x);
|
||||||
|
fprintf('Bildung des Zehnerlogharitmus: y = log10(x) = %f\n', y);
|
||||||
|
|
||||||
|
%2. Bildung des natürlichen Logharitmus
|
||||||
|
y = log(x);
|
||||||
|
fprintf('Bildung des natürlichen Logharitmus: y = log(x) = %f\n', y);
|
||||||
|
|
||||||
|
%3. Runden auf den nächstgrößeren Integer-Wert
|
||||||
|
y = ceil(y);
|
||||||
|
fprintf('Runden auf den nächstgrößeren Integer-Wert: y = ceil(y) = %f\n', y);
|
||||||
|
|
||||||
|
%4. Bildung des Absolutbetrags
|
||||||
|
a = -5;
|
||||||
|
fprintf('a = %f\n', a);
|
||||||
|
a = abs(a);
|
||||||
|
fprintf('Bildung des Absolutbetrags: a = abs(a); = %f\n', a);
|
||||||
|
|
||||||
|
%5. Bildung des konjugiert komplexen Werts einer komplexen Zahl
|
||||||
|
Z = 7 + 9j;
|
||||||
|
fprintf('Z = %d + %dj\n', real(Z), imag(Z));
|
||||||
|
Z = conj(Z);
|
||||||
|
fprintf('Bildung des konjugiert komplexen Werts einer komplexen Zahl Z = conj(Z) = %d + %dj\n', real(Z), imag(Z));
|
||||||
3
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 2/Aufgabe2_a.m
Normal file
3
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 2/Aufgabe2_a.m
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Z_1 = pi/2j;
|
||||||
|
Z_2 = -3 + 0.25j;
|
||||||
|
Z_3 = 1.25 - 0.58j;
|
||||||
10
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 2/Aufgabe2_b.m
Normal file
10
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 2/Aufgabe2_b.m
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
j = 3;
|
||||||
|
j_1 = 1i;
|
||||||
|
j_2 = 1j;
|
||||||
|
j_3 = i*i;
|
||||||
|
j_4 = j*j;
|
||||||
|
j_5 = 1j*1j;
|
||||||
|
j_6 = 1i*1j;
|
||||||
|
j_7 = i*j;
|
||||||
|
j_8 = 1e3*(-3+j);
|
||||||
|
j_9 = 1e3*(-3+1j);
|
||||||
30
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 3/Aufgabe3.m
Normal file
30
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 3/Aufgabe3.m
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
%a) Anlegen der Matrix A
|
||||||
|
A = [1 3 7 6; -3 2 8 5; 1.4 6 2 12];
|
||||||
|
|
||||||
|
%b) Erstellen der Nullmatrix B mit drei Zeilen und drei Spalen
|
||||||
|
B = zeros(3);
|
||||||
|
|
||||||
|
% Spalten 1, 3 und 4 von A in die Spalten 1, 2 und 3 von B kopieren
|
||||||
|
B(:,1) = A(:,1);
|
||||||
|
B(:,2) = A(:,3);
|
||||||
|
B(:,3) = A(:,4);
|
||||||
|
|
||||||
|
%c)Transponieren der Matrix B
|
||||||
|
B = B';
|
||||||
|
|
||||||
|
%d) Berechnung der Determinanten der Matrix B
|
||||||
|
D = det(B);
|
||||||
|
|
||||||
|
%e)
|
||||||
|
x = linspace(0, 2*pi, 100);
|
||||||
|
f = sin(x + pi/4);
|
||||||
|
%plot(x, f);
|
||||||
|
|
||||||
|
%f
|
||||||
|
anz_spalten = size(A,1);
|
||||||
|
anz_zeilen = size(A,2);
|
||||||
|
V = [1; 2; 3];
|
||||||
|
M = [1 2 3 4; 5 6 7 8; 9 10 11 12];
|
||||||
|
V_length = length(V);
|
||||||
|
M_length = length(M);
|
||||||
|
%-> length gibt immer die Länge der größten Dimension zurück.
|
||||||
6
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 4/myfunc.m
Normal file
6
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 4/myfunc.m
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
function [Mittelwert, Standardabweichung] = myfunc(Eingangsvektor)
|
||||||
|
%Eine Funktion, die aus den Elementen eines Eingangsvektors den Mittelwert
|
||||||
|
% und die Standardabweichung ermittelt und beide Werte zurückgibt.
|
||||||
|
Mittelwert = sum(Eingangsvektor) / length(Eingangsvektor);
|
||||||
|
Standardabweichung = std(Eingangsvektor);
|
||||||
|
end
|
||||||
8
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 5/myfunc.m
Normal file
8
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 5/myfunc.m
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
function myfunc(Arg)
|
||||||
|
%Programmierung, Parameterübergabe
|
||||||
|
fprintf('Eingangsparameter: %f\n', Arg);
|
||||||
|
Arg = Arg + 1;
|
||||||
|
fprintf('Parameter nach Bearbeitung: %f\n', Arg);
|
||||||
|
end
|
||||||
|
|
||||||
|
%Es wird nur der Wert übernommen, nicht die Referenz.
|
||||||
19
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 6/vecAddition.m
Normal file
19
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 6/vecAddition.m
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
function res = vecAddition(v1,v2)
|
||||||
|
%Addition von zwei Vektoren
|
||||||
|
%Überprüfen, ob beide Objekte Vektoren sind
|
||||||
|
if not(isvector(v1) && isvector(v2))
|
||||||
|
error('Mindestens einer der beiden Objekte ist kein Vektor.');
|
||||||
|
end
|
||||||
|
|
||||||
|
%Prüfen, ob beide Vektoren selbe Dimension haben
|
||||||
|
if not(length(v1) == length(v2))
|
||||||
|
error('Die Vektoren haben unterschiedliche Dimensionen.');
|
||||||
|
end
|
||||||
|
|
||||||
|
%Umwandlung in Spaltenvektor
|
||||||
|
v1 = v1(:);
|
||||||
|
v2 = v2(:);
|
||||||
|
|
||||||
|
%Addition beider Vektoren
|
||||||
|
res = v1 + v2;
|
||||||
|
end
|
||||||
9
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 7/Drehmatrix.m
Normal file
9
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 7/Drehmatrix.m
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function D = Drehmatrix(winkel)
|
||||||
|
%Berechnung der zweidimensionalen Drehmatrix; Winkel in Grad.
|
||||||
|
|
||||||
|
%Umrechnung in Rad
|
||||||
|
winkelRad = (winkel * pi) / 180;
|
||||||
|
|
||||||
|
%Generierung der Drehmatrix
|
||||||
|
D = [cos(winkelRad) -sin(winkelRad); sin(winkelRad) cos(winkelRad)];
|
||||||
|
end
|
||||||
10
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 7/Drehung.m
Normal file
10
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 7/Drehung.m
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
function x = Drehung(winkel, vektor)
|
||||||
|
%Dreht den gegebenen 2D-Spaltenvektor um den angegebenen Winkel.
|
||||||
|
|
||||||
|
%Erstellen der Drehmatrix
|
||||||
|
D = Drehmatrix(winkel);
|
||||||
|
|
||||||
|
%Drehung, durch Multiplikation mit der Drehmatrix
|
||||||
|
vektor=vektor(:);
|
||||||
|
x = D * vektor;
|
||||||
|
end
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
function x = linTransfEbene(winkel, vektor, verschiebungsvektor)
|
||||||
|
%...
|
||||||
|
%Drehung des Vektors
|
||||||
|
x = Drehung(winkel, vektor);
|
||||||
|
|
||||||
|
%Verschiebung des Vektors
|
||||||
|
x = x + verschiebungsvektor;
|
||||||
|
end
|
||||||
22
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 8/Aufgabe8_a.m
Normal file
22
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 8/Aufgabe8_a.m
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
%Radius wird frei gewählt mit R = 1
|
||||||
|
R = 1;
|
||||||
|
|
||||||
|
%X und Y Ebene werden definiert
|
||||||
|
[X, Y] = meshgrid(-1:0.01:1);
|
||||||
|
|
||||||
|
%Elemente für Z werden mit Umformung der Formel R^2 = X^2 + Y^2 + Z^2 berechnet
|
||||||
|
Z = sqrt(R^2 - X.^2 - Y.^2);
|
||||||
|
|
||||||
|
%Darstellung der oberen Hälfte
|
||||||
|
surf(X, Y, real(Z), EdgeColor="none");
|
||||||
|
hold on;
|
||||||
|
%Darstellung der unteren Hälfte
|
||||||
|
surf(X, Y, real(-Z), EdgeColor="none");
|
||||||
|
|
||||||
|
axis equal;%Gleichmäßige Achsenverhältnisse
|
||||||
|
xlabel("X");
|
||||||
|
ylabel("Y");
|
||||||
|
zlabel("Z");
|
||||||
|
title("Kugeloberfläche");
|
||||||
|
|
||||||
|
annotation("textarrow", [0.2, 0.5], [0.6, 0.5], String="Mitte des Bildes");
|
||||||
22
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 8/Aufgabe8_b.m
Normal file
22
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 8/Aufgabe8_b.m
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
%Radius wird frei gewählt mit R = 1
|
||||||
|
R = 1;
|
||||||
|
|
||||||
|
%X und Y Ebene werden definiert
|
||||||
|
[X, Y] = meshgrid(-1:0.01:1);
|
||||||
|
|
||||||
|
%Elemente für Z werden mit Umformung der Formel R^2 = X^2 + Y^2 + Z^2 berechnet
|
||||||
|
Z = sqrt(R^2 - X.^2 - Y.^2);
|
||||||
|
|
||||||
|
%Darstellung der oberen Hälfte
|
||||||
|
mesh(X, Y, real(Z));
|
||||||
|
hold on;
|
||||||
|
%Darstellung der unteren Hälfte
|
||||||
|
mesh(X, Y, real(-Z));
|
||||||
|
|
||||||
|
axis equal;%Gleichmäßige Achsenverhältnisse
|
||||||
|
xlabel("X");
|
||||||
|
ylabel("Y");
|
||||||
|
zlabel("Z");
|
||||||
|
title("Kugeloberfläche");
|
||||||
|
|
||||||
|
annotation("textarrow", [0.2, 0.5], [0.6, 0.5], String="Mitte des Bildes");
|
||||||
22
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 8/Aufgabe8_c.m
Normal file
22
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 8/Aufgabe8_c.m
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
%Radius wird frei gewählt mit R = 1
|
||||||
|
R = 3;
|
||||||
|
|
||||||
|
[PHI, THETA] = meshgrid(linspace(0, 2*pi, 50), linspace(0, pi, 50));
|
||||||
|
|
||||||
|
X = R * sin(THETA) .* cos(PHI);
|
||||||
|
Y = R * sin(THETA) .* sin(PHI);
|
||||||
|
Z = R * cos(THETA);
|
||||||
|
|
||||||
|
%Darstellung der oberen Hälfte
|
||||||
|
surf(X, Y, Z, EdgeColor="none");
|
||||||
|
hold on;
|
||||||
|
%Darstellung der unteren Hälfte
|
||||||
|
surf(X, Y, Z, EdgeColor="none");
|
||||||
|
|
||||||
|
axis equal;%Gleichmäßige Achsenverhältnisse
|
||||||
|
xlabel("X");
|
||||||
|
ylabel("Y");
|
||||||
|
zlabel("Z");
|
||||||
|
title("Kugeloberfläche");
|
||||||
|
|
||||||
|
annotation("textarrow", [0.2, 0.5], [0.6, 0.5], String="Mitte des Bildes");
|
||||||
23
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 8/Aufgabe8_d.m
Normal file
23
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 8/Aufgabe8_d.m
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
%Radius wird frei gewählt mit R = 1
|
||||||
|
R = 3;
|
||||||
|
|
||||||
|
[PHI, THETA] = meshgrid(linspace(0, 2*pi, 50), linspace(0, pi, 50));
|
||||||
|
|
||||||
|
X = R * sin(THETA) .* cos(PHI);
|
||||||
|
Y = R * sin(THETA) .* sin(PHI);
|
||||||
|
Z = R * cos(THETA);
|
||||||
|
|
||||||
|
%Darstellung der oberen Hälfte
|
||||||
|
%surf(X, Y, Z, EdgeColor="none");
|
||||||
|
fsurf('x^2')
|
||||||
|
hold on;
|
||||||
|
%Darstellung der unteren Hälfte
|
||||||
|
%surf(X, Y, Z, EdgeColor="none");
|
||||||
|
|
||||||
|
axis equal;%Gleichmäßige Achsenverhältnisse
|
||||||
|
xlabel("X");
|
||||||
|
ylabel("Y");
|
||||||
|
zlabel("Z");
|
||||||
|
title("Kugeloberfläche");
|
||||||
|
|
||||||
|
annotation("textarrow", [0.2, 0.5], [0.6, 0.5], String="Mitte des Bildes");
|
||||||
30
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 9/Aufgabe9.m
Normal file
30
MATLAB/Uebungen/01 Erste Schritte/Aufgabe 9/Aufgabe9.m
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
% Eingabe der Systemparameter
|
||||||
|
omega_n = input('Geben Sie die Kreisfrequenz omega_n ein: ');
|
||||||
|
K_P = input('Geben Sie den Verstärkungsfaktor K_P ein: ');
|
||||||
|
N = 500;
|
||||||
|
|
||||||
|
% Dämpfungsgrade
|
||||||
|
D = [0.1, 0.3, 0.7, 1.0, 2.0, 3.0];
|
||||||
|
|
||||||
|
% Zeitachse definieren
|
||||||
|
t = linspace(0, 4, N); % Anpassen für angemessenen Zeitbereich
|
||||||
|
|
||||||
|
% Erstellen der Sprungantworten für jeden Dämpfungsgrad
|
||||||
|
figure; % Erstellt ein neues Figure-Fenster
|
||||||
|
hold on; % Hält das aktuelle Figure-Fenster für mehrere Plots offen
|
||||||
|
for i = 1:length(D)
|
||||||
|
% Berechnung der Systemantwort
|
||||||
|
sys = tf(K_P * [omega_n^2], [1, 2*D(i)*omega_n, omega_n^2]);
|
||||||
|
[y, t] = step(sys, t);
|
||||||
|
|
||||||
|
% Zeichnen der Sprungantwort
|
||||||
|
plot(t, y, 'DisplayName', sprintf('D = %.1f', D(i)));
|
||||||
|
end
|
||||||
|
|
||||||
|
% Anpassungen des Diagramms
|
||||||
|
xlabel('Zeit (s)');
|
||||||
|
ylabel('Ausgang');
|
||||||
|
title('Sprungantworten eines PT2-Systems für verschiedene Dämpfungsgrade');
|
||||||
|
legend('show'); % Zeigt die Legende an
|
||||||
|
grid on; % Fügt ein Gitter hinzu
|
||||||
|
hold off; % Beendet den "hold on"-Status
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
syms t s;
|
||||||
|
|
||||||
|
sigma = heaviside(t);
|
||||||
|
|
||||||
|
SIGMA(s) = laplace(sigma,s);
|
||||||
|
|
||||||
|
syms s D w_0 w_e;
|
||||||
|
|
||||||
|
assume(w_0>0);
|
||||||
|
assumeAlso(0<D<1);
|
||||||
|
|
||||||
|
G(s) = 1/((1 / w_0^2)*s^2+(2*D/w_0)*s+1);
|
||||||
|
|
||||||
|
H(s) = SIGMA * G;
|
||||||
|
|
||||||
|
h(t) = ilaplace(H, t);
|
||||||
|
|
||||||
|
w_e = w_0*(1 - D^2)^(1/2);
|
||||||
|
|
||||||
|
disp(simplify(h,"Steps",100));
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
syms x;
|
||||||
|
f(x) = x^x;
|
||||||
|
f_x = diff(f,x);
|
||||||
|
f_xx = diff(f_x,x);
|
||||||
|
f_xxx = diff(f_xx,x);
|
||||||
|
|
||||||
|
disp("f'(x):");
|
||||||
|
disp(simplify(f_x,100));
|
||||||
|
|
||||||
|
disp("f''(x):");
|
||||||
|
disp(simplify(f_xx,100));
|
||||||
|
|
||||||
|
disp("f'''(x):");
|
||||||
|
disp(simplify(f_xxx,100));
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
syms x;
|
||||||
|
f(x) = tan(x);
|
||||||
|
f_x = diff(f,x);
|
||||||
|
disp(f_x);
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
syms x;
|
||||||
|
f(x) = 1-x / sqrt(x)-x;
|
||||||
|
|
||||||
|
f_x = diff(f,x);
|
||||||
|
disp(f_x);
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
syms x;
|
||||||
|
f(x) = x^2 * x^(3/4);
|
||||||
|
|
||||||
|
f_x = diff(f,x);
|
||||||
|
|
||||||
|
%simplify(f_x,Steps=100);
|
||||||
|
|
||||||
|
disp(f_x);
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
syms t;
|
||||||
|
|
||||||
|
f(t) = (6*(1+2*t^2 )*(t^3 - t)^2) / (sqrt(t+5*t^2)*(4*t)) + (sqrt(1+2*t)) / (t + sqrt(1+t^2));
|
||||||
|
|
||||||
|
f_t = diff(f,t);
|
||||||
|
|
||||||
|
%simplify(f_t,Steps=100);
|
||||||
|
|
||||||
|
disp(f_t);
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
syms x y;
|
||||||
|
|
||||||
|
f(x,y) = (sin(x-2)*exp(2*y)) / ((x-1)^3 * (y^2 +3)^5 );
|
||||||
|
|
||||||
|
f_x = diff(f,x);
|
||||||
|
f_y = diff(f,y);
|
||||||
|
f_xy = diff(f_x,y);
|
||||||
|
|
||||||
|
%simplify(f_t,Steps=100);
|
||||||
|
|
||||||
|
disp(f_x);
|
||||||
|
disp(f_y);
|
||||||
|
disp(f_xy);
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
syms x y z;
|
||||||
|
|
||||||
|
f(x,y,z) = [x*y^3; x*y*z; y^2*z^4];
|
||||||
|
|
||||||
|
disp(jacobian(f));
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
syms x;
|
||||||
|
|
||||||
|
x_0 = 0;
|
||||||
|
n=4;
|
||||||
|
|
||||||
|
f(x) = log(1+x);
|
||||||
|
|
||||||
|
T(x) = taylor(f,x,x_0);
|
||||||
|
|
||||||
|
disp(T);
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
syms x;
|
||||||
|
|
||||||
|
x_0 = 1;
|
||||||
|
n=5;
|
||||||
|
|
||||||
|
f(x) = 3^x;
|
||||||
|
|
||||||
|
T(x) = taylor(f,x,x_0);
|
||||||
|
|
||||||
|
disp(T);
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
syms x;
|
||||||
|
|
||||||
|
x_0 = 0;
|
||||||
|
n=4;
|
||||||
|
|
||||||
|
f(x) = 1 / (1-x)^3;
|
||||||
|
|
||||||
|
T(x) = taylor(f,x,x_0);
|
||||||
|
|
||||||
|
disp(T);
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
syms x y;
|
||||||
|
|
||||||
|
x_0 = [13; -11];
|
||||||
|
n=3;
|
||||||
|
|
||||||
|
f(x,y) = exp(y/x-2);
|
||||||
|
|
||||||
|
T(x,y) = taylor(f,[x,y],x_0);
|
||||||
|
|
||||||
|
disp(T);
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
syms x y z;
|
||||||
|
|
||||||
|
x_0 = [1,2,3];
|
||||||
|
n=3;
|
||||||
|
|
||||||
|
f(x,y,z) = sin(x*y*z)*sinh(x*y*z);
|
||||||
|
|
||||||
|
T(x,y,z) = taylor(f,[x,y,z],x_0);
|
||||||
|
|
||||||
|
disp(T);
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
syms x;
|
||||||
|
|
||||||
|
f(x) = x^sin(x);
|
||||||
|
|
||||||
|
disp(limit(f,x,0));
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
syms x;
|
||||||
|
|
||||||
|
f(x) = x+sin(x) / x;
|
||||||
|
|
||||||
|
disp(limit(f,x,inf()));
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
syms x;
|
||||||
|
|
||||||
|
f(x) = 2 / 1+exp(-1/x);
|
||||||
|
|
||||||
|
disp(limit(f,x,"left"));
|
||||||
|
disp(limit(f,x,"right"));
|
||||||
|
disp(limit(f,x,0));
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
syms x
|
||||||
|
|
||||||
|
f(x) = log(x);
|
||||||
|
|
||||||
|
F(x) = int(f, x);
|
||||||
|
|
||||||
|
disp(F);
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
syms x a b n
|
||||||
|
|
||||||
|
f(x) = nthroot(a*x-b,n);
|
||||||
|
|
||||||
|
F(x) = int(f, x);
|
||||||
|
|
||||||
|
disp(F);
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
syms x a b n c
|
||||||
|
|
||||||
|
f(x) = x / sin(a * x)^2;
|
||||||
|
|
||||||
|
F(x) = int(f, x);
|
||||||
|
|
||||||
|
disp(F);
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
syms x a b n c
|
||||||
|
|
||||||
|
f(x) = 1 / (b + c * exp(a * x));
|
||||||
|
|
||||||
|
F(x) = int(f, x);
|
||||||
|
|
||||||
|
disp(F);
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
syms x a b n c
|
||||||
|
|
||||||
|
f(x) = tan(a * x) / (1 + tan(a * x));
|
||||||
|
|
||||||
|
F(x) = int(f, x);
|
||||||
|
|
||||||
|
F(x) = simplify(F, Steps=10000, Seconds=30);
|
||||||
|
|
||||||
|
disp(F);
|
||||||
Reference in New Issue
Block a user