Azzera filtri
Azzera filtri

Inconsistent Performance by MATLAB 2010b

1 visualizzazione (ultimi 30 giorni)
ARS
ARS il 29 Apr 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 Commento
Jan
Jan il 29 Apr 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?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Shifting and Sorting Matrices in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by