Filter löschen
Filter löschen

not display in edit text box matlab GUI

2 Ansichten (letzte 30 Tage)
raviranjan singh
raviranjan singh am 28 Mai 2018
Kommentiert: Rik am 29 Mai 2018
i write a code:
fid = fopen('1.txt','r');
indata = textscan(fid, '%f', 'HeaderLines',1);
fclose(fid);
yourdata = indata{1};
set(handles.edit1,'%f',display(yourdata)); but the value is not display in edit text box. pls suggest what i change to display the number.
  1 Kommentar
Rik
Rik am 29 Mai 2018
I re-opened this question. If you have trouble with an answer, ask for clarification instead of closing and posting a new one.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Rik
Rik am 28 Mai 2018
uicontrol objects have a String property that you need to set. The line below should help you along.
set(handles.edit1,'String',sprintf('%f',yourdata));

Weitere Antworten (0)

Kategorien

Mehr zu Data Import and Export finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by