這是網站上給的建議:
參考網站:/cn/help/matlab/matlab_prog/resolving-out-of-memory-errors.html
Compress
data
to
reduce
memory
fragmentation.
If
possible,
break
large
matrices
into
several
smaller
matrices
so
that
less
memory
is
used
at
any
one
time.
If
possible,
reduce
the
size
of
your
data.
Make
sure
that
there
are
no
external
constraints
on
the
memory
accessible
to
MATLAB.
(On
UNIX?
systems,
use
the
limit
command
to
check).
Increase
the
size
of
the
swap
file.
We
recommend
that
you
configure
your
system
with
twice
as
much
swap
space
as
you
have
RAM.
See
Increasing
System
Swap
Space,
below.
Add
more
memory
to
the
system.
關於樓主說
單獨使用matlab運行不會報錯,C#調用時就會out
of
memory。
是不是可以這樣理解,調用matlab的C#
會比淡出用matlab消耗內存更大,把數據量減半試試吧。
我是在直接用matlab做BP網絡時,內存溢出,沒有辦法。