|
"Markus" wrote in message <jm691m$hd8$1@newscl01ah.mathworks.com>...
> Dear Mathlabs,
>
> I don't know why it has to be always the simple stuff that is not working with me ;-)
> I am a newbie, I admit!
>
> I simply want to have the respective values of a certain row of an excel sheet displayed in an edit-text field "2" in my GUI. The specialty is, the respective value is to be grabbed from another edit-text field "1" of the GUI! (2 edit-texts, the second should get the value from the first one in which row to look at in the excel file)
> Here we go:
>
> function edittextfield2_Callback ........
> T=xlsread('excel', 'sheet, 'range'); %T is a 1000x1 matrix
> M=get(handles.edittextfield1, 'Value'); %is edittextfield1 to be made global??
> N=T(M,:);
> set(handles.edittextfield2, 'String', num2str(N));
>
> I don't know, why my edittextfield2 stays at its initial value "0" all the time.. ?!!?
>
> Thanks a lot for help! Cheers, Markus
To get the number in your first edit text, you have to do:
M = str2num(get(handles.edittextfield1,'String');
|