Skip to content

MATLAB crashes immediately when calling fooof() in MATLAB (Linux environment) #37

@lnxxx0712

Description

@lnxxx0712

I'm trying to use fooof in matlab(version 2021a) on Linux enviroment. I create python3.7 use conda in the system.
When I use python --version command I got:

version: '3.7'
executable: '/nfs/thal/home/personal/.conda/envs/seeg/bin/python3'
library: '/nfs/thal/home/personal/.conda/envs/seeg/lib/libpython3.7m.so'
home: '/nfs/thal/home/personal/.conda/envs/seeg'
isloaded: 0

So I modified the fooof_example_one_spectrum.m file below:

%% FOOOF Matlab Wrapper Example - Single PSD
%
% This example computes an example power spectrum model for a single
% power spectrum, and prints out the results.
%

%% Run Example
clc; clear all;

% Set Fooof_mat path
fooof_path = '/nfs/thal/home/personal/matlabfiles/fooof_mat-main/fooof_mat';
addpath(fooof_path);

%%
% Load data
load('/nfs/thal/home/personal/matlabfiles/fooof_mat-main/examples/data/ch_dat_one.mat');

% Calculate a power spectrum with Welch's method
[psd, freqs] = pwelch(ch_dat_one, 500, [], [], s_rate);

% Transpose, to make inputs row vectors
freqs = freqs';
psd = psd';

% FOOOF settings
settings = struct();  % Use defaults
f_range = [1, 30];

%%
% Run FOOOF
fooof_results = fooof(freqs, psd, f_range, settings);

% Print out the FOOOF Results
fooof_results

However, when comes to the code fooof_results = fooof(freqs, psd, f_range, settings); , MATLAB crashes immediately. Did I miss something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions