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
\documentclass[12pt,a4paper]{ltjsarticle} | |
\usepackage[ipa]{luatexja-preset} | |
\usepackage{amsmath} | |
\usepackage{tikz}\usetikzlibrary{arrows} | |
\begin{document} | |
\tikzstyle{ineq}=[remember picture,outer sep=2pt,baseline] | |
列の入れ替えは操作行列を右から乗じることと同じ. | |
\[ | |
\begin{bmatrix} | |
\tikz[ineq]{\node(a11){$a_{1,1}$};} & a_{1,2} & \tikz[ineq]{\node (a13){$a_{1,3}$};}& a_{1,4}\\ |
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
A=np.array([[1,1,1,0],[1,-3,0,1]]); | |
b=np.array([10,5]); | |
c=np.array([-3,-1,0,0]) | |
BI=[0,1];NI=[2,3]; # Basis and non-basis indices | |
AB=A[:,BI];AN=A[:,NI]; | |
cB=c[BI];cN=c[NI]; | |
pi=np.linalg.solve(AB.T,cB) | |
xB=np.linalg.solve(AB,b) | |
cond=cN-np.dot(AN.T,pi) | |
print "xB:",xB |
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
"\C-n": history-search-forward | |
"\C-p": history-search-backward | |
"\e[A": history-search-backward | |
"\e[0A": history-search-backward | |
"\e[B": history-search-forward | |
"\e[0B": history-search-forward |
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
\documentclass[a4j]{jarticle} | |
\title{\LaTeX サンプル} | |
\author{川内 情太郎 {\tt(B4TB9999)}} | |
\begin{document} | |
\maketitle | |
これは \LaTeX のサンプルです. | |
こうすると{\bf 太字} が書けます. | |
タイプライター体は{\tt email@example.com} とします. | |
メール・アドレスや学籍番号などを表現するのに便利です. |
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
\documentclass[a4j]{jarticle} | |
\title{\LaTex エラー対策サンプル} | |
\author{川内 情太郎 {\tt(B4TB9999)} | |
\begin{document} | |
\maketitle | |
\section(冒頭} | |
吾輩は猫である。名前はまだ無い。 | |
どこで生れたか頓と見當がつかぬ。何でも薄暗いじめじめした所でニヤーニヤー |
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
// sample1-1.cpp: 文字列の出力(1) | |
#include <iostream> // 標準入出力ライブラリを読み込む | |
int main (void) // main 関数の戻り値(int)と引数(void)の型を宣言 | |
{ // main 関数ブロックの始まり | |
std::cout << "私の名前は 川内 情太郎 です"; // 標準出力ストリーム(std::cout)に文字列を渡す | |
std::cout << std::endl; // std::cout に std::endl マニピュレータを渡す | |
return 0; // 無事に終わったことを表すために 0 を返す | |
} // main 関数ブロックの終わり |
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
// sample1-2.cpp: 文字列の出力(2) | |
#include <iostream> // 標準入出力ライブラリを読み込む | |
using namespace std; // std という名前空間を使うことを宣言 | |
int main (void) // main 関数の戻り値(int)と引数(void)の型を宣言 | |
{ // main 関数ブロックの始まり | |
cout << "私の" << "名前は "; // << 演算子を使うことで,出力を「繋げられる」 | |
cout << "川内 情太郎" // センテンスの途中で改行を入れてもよい | |
<< " です"; // | |
cout << endl; // センテンスを変える場合,その場合は出力先を再度指定する |
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
// sample1-3.cpp: 文字列の出力(3) | |
#include <iostream> // 標準入出力ライブラリを読み込む | |
using namespace std; // std という名前空間を使うことを宣言 | |
int main (void) // main 関数の戻り値(int)と引数(void)の型を宣言 | |
{ // main 関数ブロックの始まり | |
cout << "私の名前は" // 自分の名前を表示 | |
<< "川内 情太郎" // | |
<< "です" << endl; // endl を出力することで改行される. | |
cout << "私は " // 自分の誕生日を表示 |
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
// sample2-1.cpp: 与えられた半径から,円周長,円の面積,球の表面積と体積を計算する | |
#include <iostream> // 標準入出力ライブラリを読み込む | |
#include <math.h> // 算術演算ライブラリを読み込む(べき乗関数 pow 用) | |
using namespace std; // std という名前空間を使うことを宣言 | |
int main (void) // main 関数の戻り値(int)と引数(void)の型を宣言 | |
{ // main 関数ブロックの始まり | |
// 半径を 12.34 cm | |
// 円周率を 3.14 として計算する | |
cout << "半径: " << 12.34 << " 円周率: " << 3.14 << endl; |
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
// sample2-1-error1.cpp: 与えられた半径から,円周長,円の面積,球の表面積と体積を計算する | |
#include <iostream> // 標準入出力ライブラリを読み込む | |
#include <math.h> // 算術演算ライブラリを読み込む(べき乗関数 pow 用) | |
using namespace std; // std という名前空間を使うことを宣言 | |
int main (void) // main 関数の戻り値(int)と引数(void)の型を宣言 | |
{ // main 関数ブロックの始まり | |
// 半径を 56.789 cm | |
// 円周率を 3.141 として計算する | |
cout << "半径: " << 56.789 << " 円周率: " << 3.141 << endl; |
OlderNewer