MATLAB: I used 5 sliders in which values of 1st is changing in edit box. Others are not changing. Coding attached.

guideslider

i want to add edit box for each slider separately but if we continue coding with defined functions for each slider its not showing separate edit box for each slider rather the values are represented only in the 1st box for each slider please tell me how can i add different edit box for each slider. Also I have changed the position of edit box 2 for slider 2 but its not working.

Best Answer

Just as you created each pushbutton and slider individually you should also create each edit box as well. Then pass the handle as done with {@edit_val,Slider1} but include the edit box handles which you can set with set(editboxhandle,'String',num2str(_______)) where the ___ is the number you want to set the editbox with.