1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit3 as text
% str2double(get(hObject,'String')) returns contents of edit3 as a double
load n;
load ('p.mat');
pm = get(handles.edit3,'string');
pm = str2double(pm);
for i=1:n
for j=1:n
p(i,j)=pm;
end
end
p
guidata(hObject, handles); |
Partager