필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Black4Ghost
Black4Ghost 2019년 11월 28일
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