ERROR: Conversion to double from struct is not possible.

9 visualizaciones (últimos 30 días)
Rachit Upadhyay
Rachit Upadhyay el 16 de Mayo de 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.

Respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by