How can I open a document (Excel) from my Edit Box in Matlab GUI?

1 次查看(过去 30 天)
As statted in the title I dont know how to let matlab follow a hyperlink that is written in the edit box from my gui. Is there a special command except uigetdir and uigetfile?
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(~, ~, ~)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% figure;
% t = 0:0.1:2*pi;
% x = cos(t); y = sin(t);
% plot(x, y, 'r');
% axis equal;
%[v,~,~]=xlsread('Test für Azubi.xlsx'); %Auswahl der Datei
v=edit1;
w=v(:,2);
x=v(:,3);
y=v(:,4);
z=v(:,5); %Zuordnung von den Columns zu variablen
plot(w); %Darstellen von CellA
hold on; %ermöglichen von vermehrter Darstellung von Werten auf y Achse
plot(x); %Darstellen von Max_Li
plot(y); %Darstellen von Max_Re
yyaxis right; %Rechte Achse mit Batterie Spannung
z=v(:,5); %Vorgabe der Daten für rechte y Achse
plot(z); %Darstellen von CellV
hold off
function edit1_Callback(~, ~, ~)
% hObject handle to edit1 (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 edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
edit1 = uigetdir;

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Language Fundamentals 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by