Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
2
Help us understand the problem. What is going on with this article?
@tg-git

julia メモ

More than 3 years have passed since last update.

tutorial

http://samuelcolvin.github.io/JuliaByExample/
http://quant-econ.net/jl/learning_julia.html
https://en.wikibooks.org/wiki/Introducing_Julia
http://samuelcolvin.github.io/JuliaByExample/
http://learnxinyminutes.com/docs/julia/
https://github.com/chrisvoncsefalvay/learn-julia-the-hard-way

read
open("file_name") do f
    for line in eachline(f)
        print(line)
    end
end
read2_指定文字列の存在する行を抜き出す.
name="hogefuga" # 指定文字
f=readall("file_name")
dat=matchall(Regex("$name"".*"),f)
read3_データを行列に格納
f = open("file_name")
dat=readdlm(f)
read4_matchした行があったらループを終了
lines = open( "file_name", "r" ) do fp
    dat=readlines( fp )
    n=0
    for line in dat
        n+=1
        if( ismatch(r"$name", line)) 
            n+=1
            break
        end
    end
end

write
open("output.txt", "w") do f
    for n = 0:9
        write(f, string(n)"\n")
    end
end
中身のサイズが不明な配列(5個)を,配列の各要素に持たせる.
d=Array(Array,5)
行列の演算
A.*B        # 要素ごとの積
A.^B        # 要素ごとにB乗する.
dot(A,B)    # 内積
A'         # 転置
式展開
"$a"
2
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
tg-git

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
2
Help us understand the problem. What is going on with this article?