Filter löschen
Filter löschen

open cell array/structure

1 Ansicht (letzte 30 Tage)
Guilherne
Guilherne am 9 Okt. 2011
I have a .m file of cell array that I want to set in a uitable data, but the following error appears:
??? Error using ==> set Values within a cell array must be numeric, logical, or char
Then i repaired that the program open the file but in the format:
Data =
{30x5 cell}
Not as a matrix.
Because the matrix has strings, and I want to set them in the uitable too, I can use the function cell2mat.
In fact, when I open the .m file it comes as a structure array, but I changed it to a cell array because i thought it would be better.. can someone help me?

Akzeptierte Antwort

Guilherne
Guilherne am 9 Okt. 2011
As I said, the above error appears, I think that occurs because the matlab doesnt read the matrix, just a "{30x5 cell}". Whem my file only had numbers, i could use "cell2mat", then it becomes a matrix to matlab and the set worked well.
  6 Kommentare
Guilherne
Guilherne am 9 Okt. 2011
Thanks man! i didnt know i could use the data that way (Dados = Dados_1.table_1; ), problem solved, thank you again because of the patience with me and my terrible english!
Guilherne
Guilherne am 9 Okt. 2011
Walter, that happened because my uitable size is 30x5, and it saves even the blank spaces, I think.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Scope Variables and Generate Names finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by