필터 지우기
필터 지우기

User definition of cell contents

조회 수: 1 (최근 30일)
Tom
Tom 2014년 2월 17일
댓글: Tom 2014년 2월 17일
Hello,
I have a cell which contains 4 'atom types', e.g.
all_atom_type =
'Eu3+'
'Na1+'
'O2-'
'Si4+'
What is the best way to allow a user to 'define' these types? By that I mean I would want them to be able to specify which type is a 'former', which is a 'modifer', 'dopant' and 'oxide'?
kind regards,
Tom

채택된 답변

Mischa Kim
Mischa Kim 2014년 2월 17일
편집: Mischa Kim 2014년 2월 17일
Tom, you could use a structure array. As an example:
all_atom(1).name = 'Eu3+';
all_atom(1).type = 'former'; % is it really a former, I am just guessing
all_atom(2).name = 'Na1+';
all_atom(2).type = 'dopant';
Alternatively, use tables.
  댓글 수: 4
Image Analyst
Image Analyst 2014년 2월 17일
You could ask via inputdlg(). Otherwise if it's really only 4, then you could have 4 drop down lists ("popups") on your GUI and the user can select the proper classification from the list.
Tom
Tom 2014년 2월 17일
Thanks guy. I think the inputdlg method will suffice.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by