how to transfrer data in guide ?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I have built a UI in guide. I have created an "edit text" function. I wish to allow the user to insert a numeric value and have that value saved and reused in other functions in my program. the problem is that if the user does not insert a value an error occurs. how can i assign a default value (and have it usable in all functions in the program)? thanks
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2013년 1월 13일
편집: Azzi Abdelmalek
2013년 1월 13일
In you opening function insert a code below:
set(handles.edit1,'string','YourDefaultValue')
Which functions? to read your value just use
YourValue= str2double(get(handles.edit1,'string'))
You can also use guidata to transfer your data
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!