Inconsistent Performance by MATLAB 2010b

2 visualizaciones (últimos 30 días)
ARS
ARS el 29 de Abr. de 2012
Hi All (specially MATLAB developers)
I run the following code
for k=1:783
sortedfile=sortrows(tosort,k,'descend');
ranks(:,k)=sortedfile(:,1);
end;
it runs once very smoothly and produces a dataset array "ranks". Next time I run the same code, it gives the following error first
the following error occurred converting from dataset to double:
Error using ==> double
Conversion to double from cell is not possible.
also when I start my loop from 2:783 (bcoz first column contains asset names,I receive the following error:
??? Index exceeds matrix dimensions.
Also exporting 783 columns to XLS file is not allowed, when I write:
export(ranks,'XLSfile','rankfile2.xlsx');
it writes upto column 680 and returns and error number:
Error writing dataset variable 'Var690' to 'rankfile2.xlsx':
Excel returned: Error: Object returned error code: 0x800A03EC..
MATLAB gurus, plz reply....how to tackle with this.
Regards,
AMD.
  1 comentario
Jan
Jan el 29 de Abr. de 2012
Currently the question is not clear. What is the type of "tosort"? What does "next time I run the same code" mean: inside the same function, or calling the same function again, or with the same data? Did you pre-allocate the variable ranks? If so, to which type and dimensions?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by