ERROR: Conversion to double from struct is not possible.

조회 수: 9 (최근 30일)
Rachit Upadhyay
Rachit Upadhyay 2021년 5월 16일
[~,sys] = memory;
testLen = floor(sys.PhysicalMemory.Total/100/8);
load('Mark-III.mat');
x = load('Mark-III.mat','x');
xt = distributed(x);
clusters = PerformFinalClustering(xt,stepSize);
Warning: Converting distributed data to double.
In pdist (line 128)
In PerformFinalClustering (line 15)
In Final (line 10)
Error using codistributed/double (line 23): Conversion to double from struct is not possible.
Error in distributedutil.distributedSpmdWrapper>iInnerWrapper (line 82): [varargout{:}] = fcnH( varargin{:} );
Error in spmd_feval_fcn>get_f/body (line 78): [outCell{:}] = fcnH( inCell{:} );
Here the x is a 167072X31 2D matrix of double and stepSize is a single double value. Without the use of distributed function the result is Out of Memory and with it this is the error. Apparently, x is the struct and I have no way of converting it into double.
The PerformFinalClustering() only uses xt and stepSize and still the memory usage is high. Any way in which these errors can be solved will be really appriciated.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by