How to create a structure with a name speficied by user in inputdlg?
조회 수: 1 (최근 30일)
이전 댓글 표시
So I ask what is the name of the structure in an inputdlg, the result is a cell array. The field is named always 'Course' and I want to create a structure named specifiedname.Course=[].
Is it possible to do?
댓글 수: 1
Image Analyst
2013년 2월 6일
Why would you want to do that? It would just complicate your program, though I think you can do it with dynamic structure names, but again, it's just unnecessary complication.
답변 (1개)
Dan K
2013년 2월 6일
Folks, please don't crucify me for this one, but the easiest way I see to do it is:
eval([specifiedname '.Course = []']);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!