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
# coding: utf-8 | |
try: | |
import urllib.request | |
except ImportError: | |
raise ImportError('You should use Python 3.x') | |
import os.path | |
import gzip | |
import pickle | |
import os | |
import numpy as np |
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
function besttf = determineSystem(z, npole, nzero) | |
%% determineSystem.m | |
% Grid search a system model from the given number of zeros and poles | |
% | |
%% Inputs: | |
% z : iddata object (created by iddata(y,u,Ts)) | |
% npole : maximum number of poles for grid search | |
% nzero : maximum number of zeros for grid search | |
% | |
%% Outputs: |
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; close all; | |
s=tf('s'); | |
G=1/(s^2+s+1); | |
ts=0.1; | |
t=0:ts:20; | |
nx=10; | |
u=[zeros(nx,1)',ones(length(t)-nx,1)']; | |
[y,t]=lsim(G,u,t); | |
z=iddata(y,u',0.1); %uを転置してカラムベクトルに直す |
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
$ 1 0.000005 81.92041607667615 50 5 43 | |
c 224 208 224 160 0 0.000001 0.0010000007181592135 | |
r 224 160 320 160 0 10000 | |
r 224 128 320 128 0 10000 | |
c 336 256 416 256 0 1e-10 0.0010000012681743442 | |
r 560 96 608 96 0 10000 | |
r 640 176 720 176 0 100000 | |
c 496 128 560 128 0 0.000001 3.242821716512841 | |
r 352 224 400 224 0 100000 | |
g 224 272 224 288 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
clear all; close all; | |
f = @(m,eta,g,t) m/eta^m*(t-g).^(m-1); | |
t=0.1:0.1:2; | |
m=0.5; eta=3; g = 0; | |
lambda = f(m,eta,g,t); | |
subplot(311); | |
plot(t,lambda); | |
hold on; |
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
sentences = [] | |
fout = open("output.txt","w") | |
with open("sub.txt") as f: | |
lines = f.readlines() | |
for line in lines: | |
if not line in sentences: | |
sentences.append(line) | |
fout.write(line) |
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 json | |
import os | |
import random | |
with open('data.txt') as json_file: | |
data = json.load(json_file) | |
for p in data: | |
if "files" in p: | |
q = p['files'][0] | |
if "mimetype" in q: |
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
date | positive | |
---|---|---|
2020-2-6 | 16 | |
2020-2-7 | 16 | |
2020-2-10 | 16 | |
2020-2-12 | 16 | |
2020-2-13 | 17 | |
2020-2-14 | 21 | |
2020-2-17 | 46 | |
2020-2-18 | 53 | |
2020-2-19 | 60 |
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
/* | |
Model Rocket Engine Dynamometer - Nick Cinquino 9/1/15 | |
V.5 Original 10Kg loadcell Modified from Nathan Seidle, SparkFun Electronics, November 19th, 2014 | |
Output data in grams (g). There are 101.97 gram-force per Newton, for conversion. | |
Your calibration factor may be very positive or very negative. | |
It all depends on the setup of your individual loadcell, and the direction the sensors deflect from zero state. | |
Need to experiment! | |
Hack the HX711 board to set pin 15 high, for 80 samples per second. | |
This example code uses bogde's excellent library: https://github.com/bogde/HX711 | |
bogde's library is released under a GNU GENERAL PUBLIC LICENSE |
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
# -*- coding: utf-8 -*- | |
# ====== | |
# 多段ロケットの最適質量配分(サイジング)問題の計算 | |
# 必要な軌道速度に空力損失、重力損失、推力損失、制御損失を追加し、 | |
# トータルの⊿Vを事前に算出し、その軌道速度に必要なサイジングを行う。 | |
# 初期検討段階にのみ使用可能。 | |
# | |
# 入力: | |
# 各段のIsp[秒] | |
# 各段の構造比(0.0~1.0)(各段の全備重量と推進剤以外の割合) |
NewerOlder