필터 지우기
필터 지우기

How can I pull a string from a file to GUI

조회 수: 1 (최근 30일)
Jasmine Shragai
Jasmine Shragai 2015년 7월 17일
답변: Azzi Abdelmalek 2015년 7월 17일
Hi everyone! I'm rather new in Matlab, and I got a summer job from my university, so I could really use some help :) I am trying to write some sort of a questionnaire, which will be answered by GUI. I have started to create a general screen using GUIDE, though I would like to pull the text displayed in one part of a screen, from a text file (so the text can be easily changed be the ones in charge of it).
How would you recommend I do this? Thanks in advance! :)

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 17일
Use textscan to read your text from your text file
fid=fopen('file.txt')
a=textscan(fid,'%s','delimiter','\n')
fclose(fid)
text=a{:}
Then Use an Edit Box to display it

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by