Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

why function name added to table column name?

1 visualizzazione (ultimi 30 giorni)
Zeynab Mousavikhamene
Zeynab Mousavikhamene il 26 Ott 2019
Chiuso: MATLAB Answer Bot il 20 Ago 2021
I used sortrow to sort the columns of table and it worked but sortrow is added to each variable name of table.
sortedtable=varfun(@sortrows,KsTable,'GroupingVariables',{'k_name'});
The table before using sortrow:
after using sortrow:
any idea how to fix this?

Risposte (1)

Walter Roberson
Walter Roberson il 27 Ott 2019
I do not see an option to override that. However you can
sortedtable.Properties.VariableNames = KsTable.Properties.VariableNames;
  1 Commento
Zeynab Mousavikhamene
Zeynab Mousavikhamene il 27 Ott 2019
@ Walter Roberson: Yeah it was strange to me why adding sortrow to all file names.
As there are many columns in the table, it is not efficient to do one by one that's why I asked here.

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by