#author("2020-11-30T11:03:32+09:00","default:Miyashita","Miyashita") #author("2020-11-30T11:03:53+09:00","default:Miyashita","Miyashita") * .mat ファイル関連 [#t4f2ea07] MATLAB の mat ファイルの扱いには [[JuliaIO/MAT.jl>https://github.com/JuliaIO/MAT.jl]] を使おう.~ 原則,上記ページの README に書いてある通り.~ ** mat ファイルから変数を取得 [#ide55415] #codeprettify(lang-julia){{ using MAT: MAT }} #codeprettify(lang-julia){{ matfile = MAT.matopen("hogehoge.mat") varA = read(matfile,"varA") close(matfile) }} 自分で定義したクラス?は読めない?~ ~ ~ ** jld2 ファイルから mat へ [#n96428d3] MATLAB ユーザーへデータを渡すとき. #codeprettify(lang-julia){{ using JLD2 using MAT: MAT @load "hogehoge.jld2" var1 var2 file = MAT.matopen("hogehoge.mat", "w") MAT.write(file, "var1", var1) MAT.write(file, "var1", var2) MAT.write(file, "var2", var2) MAT.close(file) }}