首页 > 解决方案 > matlab:内存不足,可召开会议的个人电脑

问题描述

我阻止了我将在下面详细写的问题。在 3 天里,我尝试了很多不同的东西,没有一个奏效..

如果有人知道该怎么做!

这是我的消息错误:

the call to "ft_selectdata" took 0 seconds
preprocessing
Out of memory. Type "help memory" for your options.

Error in ft_preproc_dftfilter (line 187)
  tmp  = exp(2*1i*pi*freqs(:)*time); % complex sin and cos

Error in ft_preproc_dftfilter (line 144)
    filt = ft_preproc_dftfilter(filt, Fs, Fl(i), 'dftreplace', dftreplace, 'dftbandwidth',
    dftbandwidth(i), 'dftneighbourwidth', dftneighbourwidth(i)); % enumerate all options

Error in preproc (line 464)
  dat     = ft_preproc_dftfilter(dat, fsample, cfg.dftfreq, optarg{:});

Error in ft_preprocessing (line 375)
    [dataout.trial{i}, dataout.label, dataout.time{i}, cfg] = preproc(data.trial{i}, data.label,
    data.time{i}, cfg, begpadding, endpadding);

Error in EEG_Prosocial_script (line 101)
    data_intpl = ft_preprocessing(cfg, allData_preprosses);
 
187   tmp  = exp(2*1i*pi*freqs(:)*time); % complex sin and cos

matlab 提供了一些关于我的计算机和计算特征的信息

Maximum possible array: 7406 MB (7.766e+09 bytes)* 
Memory available for all arrays: 7406 MB (7.766e+09 bytes) * 
Memory used by MATLAB: 4195 MB (4.398e+09 bytes) 
Physical Memory (RAM): 12206 MB (1.280e+10 bytes)
Limited by System Memory (physical + swap file) available. 

K>> whos Name                      
               Size       Bytes         Class    Attributes
freqs         7753x1      62024         double 
li            1x1          16           double   complex 
time          1x1984512  15876096       double

因此,无法运行脚本的计算机的配置(Alienware aurora R4):

内存:免费 4gb / 12 @ 1,6Ghz --> 2x (4Gb 1600Mhz) - 2x (2Gb 1600 MHz)

英特尔酷睿 i7-3820 4 核 8 线程 3,7 GHz 1 CPU

英伟达 GeForce GTX 690 2GB

内存:金士顿 KVT8FP HYC

硬盘:SSD 金士顿 250Go SATA 3"

此代码在这台计算机上工作(Dell inspiron 14-500):配置

Ram 4 Go 内存 DDR4 2 666 MHz (4 Go x 1)

Intel® Core™ i5-8265U 8e 代,(6 Mo 内存,3,9 GHz)

英特尔® 超高清显卡 620

硬盘 SATA 2,5" 500 Go 5 400 tr/min

谢谢

亲切的问候,

标签: matlabout-of-memory

解决方案


通过这样做freqs(:)*time,您正在尝试创建一个 7753*1984512 大小的数组,但您没有内存...(您需要 ~123 GB 或 1.2309e+11 字节,您的计算机有 ~7e+09)

例如,请参见以下情况:

f=rand(7,1);
t=rand(1,19);
size(f(:)*t)

ans =

 7    19

您想要做的可能是每个时间元素的 for 循环等。


推荐阅读