ERROR: Conversion to double from struct is not possible.

7 Ansichten (letzte 30 Tage)
Rachit Upadhyay
Rachit Upadhyay am 16 Mai 2021
[~,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.

Antworten (0)

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by