MATLAB: Field text- number

field text

Hi,
if I write integer number like 4 into field text, thens it is ok.
But when I write floating number like 4.5 into field text, then write error…
How can I do this?
Thanks

Best Answer

  • I have tested my code:
    set(handles.edit1,'String',num2str(4.5));
    It's correct.