pass the last Element off array to GUI
Mostrar comentarios más antiguos
I have an issue with MATLAB GUIs that I don't know how to solve. i want to pass the last Element off array to GUi, i have tried using this code but its doesnt work
% --- Executes on button press in Aufruf_Reichweintschaetzer.
function Aufruf_Reichweintschaetzer_Callback(hObject, eventdata, handles)
% hObject handle to Aufruf_Reichweintschaetzer (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
handles=guidata(hObject);
a=required_energy(end); % last element of my array required_energy already exists in my workspace
set(handels.edit7, 'string',a);
guidata(hObject,handles);
i will apreciate any Help many thanks Jay
2 comentarios
Geoff Hayes
el 12 de Ag. de 2016
Jay - why is the required_energy variable defined in your workspace and not within the GUI? Where does it come from?
Jay Samin
el 13 de Ag. de 2016
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Function Handles en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!