Effacer les filtres
Effacer les filtres

Inconsistent Performance by MATLAB 2010b

1 vue (au cours des 30 derniers jours)
ARS
ARS le 29 Avr 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 commentaire
Jan
Jan le 29 Avr 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?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by