This file contains 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
syms Ka; | |
syms s; | |
syms K1; | |
syms R; | |
syms T; | |
G = 9/(s^2 + 2*0.2*3*s + 9); |
This file contains 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
%首先定義有哪些符號。 | |
%syms資料型態表示後面的東西是個「symbol」,再在運算時會使用代數規則,而不是計算數值。 | |
%因為要畫間題目,所以一本上題目有什麼,這裡就定義什麼符號。 | |
syms Ka; | |
syms s; | |
syms K1; | |
syms R; | |
syms T; | |
%把G打進去,並且找出開路轉移函數Gc |
This file contains 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
syms s; | |
syms K; | |
para_k = [0.7 3 6]; | |
Ga = K / (s + 7); | |
Gd = 12.2 / (s * (s + 2.2)); | |
Gc = Ga * Gd; | |
T = Gc / (1 + Gc); | |
T = simplify(expand(T)) |
This file contains 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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' |
This file contains 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
# 連體積電力學導論 Week 7, 8 | |
## Magnetic Dipole | |
現在要來導磁偶極的磁場。 | |
不過已經知道 $\vec{A{}}$ 的形式是一次平方反比了,那不就跟電偶極的部分一樣了嗎? | |
考慮一個 dx, dy 的方形線圈,我們計算他的 $\vec{A{}}$ |
This file contains 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
HOMEPATH = '~/Downloads/VelocityImages/'; | |
FOLD_NO = [5 10 20 30 40 50 55]; | |
cd(HOMEPATH); | |
for i = 1:7 | |
ORIGIN_FOLDER = [num2str(FOLD_NO(i)), '_files']; | |
CLEANED_FOLDER = [ORIGIN_FOLDER, '_cleaned']; | |
mkdir(CLEANED_FOLDER); | |
post = '.tif'; |
This file contains 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
#include<SPI.h> | |
#include<Servo.h> | |
#include "RF24.h" | |
/* Pins for servo motor */ | |
#define PIN_SERVO 6 | |
Servo s; | |
/* Pins for nrf25l01 as receiver*/ |
This file contains 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
#include <SPI.h> | |
#include "RF24.h" | |
#define CONTROLLER_PIN A0 | |
/* Pins for nrf25l01 as transmitter*/ | |
#define PIN_CE 7 | |
#define PIN_CSN 8 | |
#define PIPE_ADDRESS 0xE8E8F0F0E1LL | |
RF24 rf24(PIN_CE, PIN_CSN); |
This file contains 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
#!/usr/local/bin/bash | |
yes | sudo apt-get update | |
yes | sudo apt-get upgrade | |
yes | sudo apt-get install vim powertop git lightdm-webkit-greeter dconf-cli | |
yes | sudo apt-get remove gnome-shell-extension-ubuntu-dock | |
mkdir -p ~/.themes | |
mkdir -p ~/.icons |
This file contains 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
syms A; | |
syms t positive; | |
syms t_0 positive; | |
syms s; | |
syms omega positive; | |
sig1 = A * heaviside(t) - A * heaviside(t - t_0); | |
sig2 = (heaviside(t) - heaviside(t - 2*pi/omega))*sin(omega * t)*A; | |
sig1 = laplace(sig1, t, s); |
OlderNewer