필터 지우기
필터 지우기

Text input gives different matrix types

조회 수: 1 (최근 30일)
Jeff
Jeff 2013년 1월 27일
I'm building an application that allows someone to first create a department by entering the name of the department in an editable text box. Hit save and they are done. Then if the name names to be changed The app uses a different form but again you simply enter the name in a text box hot save and you are done. Here's the problem. When the name is first created, the array is listed as a char array. However, when the name is changed the array is labeled as a cell array. I've provided the code below. I fixed the issue by removing the curly brackets from the name change, but I don't understand why it is different.
Code to add Department or Change Name
department.Name(dptID) = {get(handles.departmentName, 'String')}

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by