Rename dataset variable
이전 댓글 표시
I am trying to rename a field in a dataset, but I get an error:
>> someDS.Properties.VarNames{3} = 'NEWNAME';
??? Error using ==> dataset.subsasgn at 418
Duplicate variable names.
No, there is no other variable with the same name I'm trying to assign!
What am I doing wrong?
Thanks
댓글 수: 3
Peter Perkins
2012년 2월 22일
Mark, I'm guessing you know this, but just in case, that error message is referring to a "dataset variable" with that name, not to a "workspace variable".
If that's not the source of confusion, then something funny is going on, and I can't reproduce it. What is returned from someDS.Properties and from someDS.Properties.VarNames?
Mark
2012년 2월 23일
Oleg Komarov
2012년 2월 23일
I cannot reproduce the problem. Please post the complete code with a minimal working example which causes the error. Also, post the MATLAB version and OS.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Managing Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!