コード例 #1
0
PCA EEG_to_PCA (EEG me, double startTime, double endTime, const wchar_t *channelRanges, int fromCorrelation) {
	try {
		autoCovariance cov = EEG_to_Covariance (me, startTime, endTime, channelRanges);
		if (fromCorrelation) {
			autoCorrelation cor = SSCP_to_Correlation (cov.peek());
			autoPCA him = SSCP_to_PCA (cor.peek());
			return him.transfer();
		} else {
			autoPCA him = SSCP_to_PCA (cov.peek());
			return him.transfer();
		}
	} catch (MelderError) {
		Melder_throw (me, ": no PCA calculated.");
	}
}
コード例 #2
0
ファイル: EEG_extensions.cpp プロジェクト: READSEARCH/praat
autoPCA EEG_to_PCA (EEG me, double startTime, double endTime, const char32 *channelRanges, int fromCorrelation) {
	try {
		autoCovariance cov = EEG_to_Covariance (me, startTime, endTime, channelRanges);
		autoPCA him;
		if (fromCorrelation) {
			autoCorrelation cor = SSCP_to_Correlation (cov.get());
			him = SSCP_to_PCA (cor.get());
		} else {
			him = SSCP_to_PCA (cov.get());
		}
		return him;
	} catch (MelderError) {
		Melder_throw (me, U": no PCA calculated.");
	}
}