This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| figure; | |
| subplot(2, 2, 1); | |
| fimplicit(@(x, y) (x.^2) - x.*y + (y.^2) - sqrt(2).*x + 2*sqrt(2).*y - 4, [-5 5 -5 5]); | |
| grid on; title('ex1-origin'); | |
| subplot(2, 2, 2); | |
| fimplicit(@(x, y) (x.^2) - x.*y + (y.^2) - 6, [-5 5 -5 5]); | |
| grid on; title('ex1-translation'); | |
| subplot(2, 2, 3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| clear; | |
| %% Data Set | |
| t = [-2; -1; 0; 1; 2]; | |
| y = [ 4; 3; 1; -1; -3]; | |
| %% Degree of approximation | |
| % n = 1; % linear | |
| % n = 2; % quadratic | |
| % n = 3; % cubic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %% Remove items from workspace | |
| clear; | |
| %% Interval of x | |
| x = linspace(-10, 10, 10000); | |
| %% Example 1 | |
| orig = x; | |
| a_0 = 0; | |
| a_k = @(k) 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tensorflow as tf | |
| hello = tf.constant('Hello, TensorFlow!') | |
| sess = tf.Session() | |
| print(sess.run(hello)) |
NewerOlder