2020-01-01から1年間の記事一覧

フォルダ内のファイルにアクセス(再掲)

[filename, pathname] =uigetfile('*.csv'); fnlen = length(filename); % get directory info dirinfo = dir(pathname); lenDir = length(dirinfo); fileNames = []; for i=3:1:lenDir readFileName = [pathname, dirinfo(i).name]; fileNames = [fileNames…

Struct access

a: structだとすると、nameというfieldを持っていた場合には a(1).name のようにアクセスする。 a.name(1) ではない。

chi-squared distribution

close all; clear all; x = 0:0.2:100; y = chi2pdf(x,38); figure; plot(x,y) ylabel('Probability density'); xlabel('Chi-squared value'); % calculate chi-squared value over specific probability % under specified degree of freedom X_05 = chi2in…