From 2c5f856e0690fb5339c47fe7e7917b8d9498f77f Mon Sep 17 00:00:00 2001 From: Abraham Xiao Date: Mon, 22 Apr 2013 09:37:56 +0800 Subject: [PATCH] Test --- Exp_02_02_02.m | 7 ------- Exp_02_02_03.m | 13 ------------- Exp_02_02_04.m | 40 ---------------------------------------- Exp_02_03_01.m | 11 ----------- Exp_02_03_02.m | 11 ----------- Exp_02_03_09.m | 8 ++++++++ 6 files changed, 8 insertions(+), 82 deletions(-) delete mode 100644 Exp_02_02_02.m delete mode 100644 Exp_02_02_03.m delete mode 100644 Exp_02_02_04.m delete mode 100644 Exp_02_03_01.m delete mode 100644 Exp_02_03_02.m diff --git a/Exp_02_02_02.m b/Exp_02_02_02.m deleted file mode 100644 index 8742092..0000000 --- a/Exp_02_02_02.m +++ /dev/null @@ -1,7 +0,0 @@ -% 20130418 XY511 12:25 -% AbrahamX @ NWPU -syms x - -% Just some basic operations, of sym expression. -f = (1/x^3 + 6/x^2 + 12/x + 8)^(1/3) -g1 = simple(f) \ No newline at end of file diff --git a/Exp_02_02_03.m b/Exp_02_02_03.m deleted file mode 100644 index 1cc2b7c..0000000 --- a/Exp_02_02_03.m +++ /dev/null @@ -1,13 +0,0 @@ -% 20130418 XY511 15:00 -% AbrahamX @ NWPU -clear all -A = sym('[a, b; c, d]') -[V, D] = eig(A) %Eigenvalues and eigenvectors - -% find the subexpressions -subexpr([V; D]) -who % results are sigma and ans - -Dw = subexpr(D, 'w') % Simplify D - -[RVD, w] = subexpr([V; D], 'w'); \ No newline at end of file diff --git a/Exp_02_02_04.m b/Exp_02_02_04.m deleted file mode 100644 index 56c316f..0000000 --- a/Exp_02_02_04.m +++ /dev/null @@ -1,40 +0,0 @@ -% 20130418 XY511 15:20 -% AbrahamX @ NWPU -% You will find how "subs" works and, -% a proper way to do exchange between sym and data -% calculation. - -clear all -syms a b x; -f = a * sin(x) + b - -f1 = subs(f, sin(x), 'log(y)') -class(f1) % the new could be char string. - -f2 = subs(f, a, 3.11) % the "3.11" will be turned to '3.11' -class(f2) - -% Find more about Cell Array from Help -f3 = subs(f, {a,b,x}, {2,5,sym('pi/3')}) -class(f3) - -format % set to default -format compact -f4 = subs(f, {a,b,x}, {2,5,pi/3}) % Now it's numerical -class(f4) - -f5 = subs(f, x, 0:pi/2:pi) % Whoops, it's an array! -class(f5) - -t = 0: pi/10: 2*pi -f6 = subs(f, {a,b,x}, {2,3,t}) -plot(t, f6) - -% We will do two times of replacement... -k = (0.5: 0.1: 1)' -f7 = subs(subs(f, {a,b}, {k, 2}), x, t); % TWO subs! -size(f7) -plot(t, f7) - - - diff --git a/Exp_02_03_01.m b/Exp_02_03_01.m deleted file mode 100644 index c3ae8eb..0000000 --- a/Exp_02_03_01.m +++ /dev/null @@ -1,11 +0,0 @@ -% 20130418 XY511 16:00 -% AbrahamX @ NWPU -syms t x k -s = sin(k*t)/(k*t) -f = (1-1/x)^(k*x); - -% Now let's find their limits -Lsk = limit(s, 0) % Limit of s when t --> 0 -Ls1 = subs(Lsk, k, 1) % It's a great function, so to remember -Lf = limit(f, x, inf) % Limit of f when x --> inf -Lf1 = vpa(subs(Lf, k, sym('-1')), 48) \ No newline at end of file diff --git a/Exp_02_03_02.m b/Exp_02_03_02.m deleted file mode 100644 index 8d3228b..0000000 --- a/Exp_02_03_02.m +++ /dev/null @@ -1,11 +0,0 @@ -% 20130418 XY511 18:11 -% AbrahamX @ NWPU -% The following few are aboout integral and -% differential -syms a t x; -f = [a, t^3; t*cos(x), log(x)] -df = diff(f) % diff matrix f, x as the variable - -dfdt2 = diff(f, t, 2) - -dfdxdt = diff(diff(f, x), t) \ No newline at end of file diff --git a/Exp_02_03_09.m b/Exp_02_03_09.m index e69de29..0056a41 100644 --- a/Exp_02_03_09.m +++ b/Exp_02_03_09.m @@ -0,0 +1,8 @@ +% 20130418 XY511 23:20 +% AbrahamX @ NWPU +clear all +clc +syms x +f1 = x * log(x) +s1 = int(f1, x) +s1 = simple(s1) \ No newline at end of file