wie kann ich aus einer excel datei ein plot coden/ how can i code a plot from an excel file?
Afficher commentaires plus anciens
Deutsch
hallo meinen lieben matlabern
ich versuch aus einer excel datei ein bestimmtes sheed auszuwählen um dort aus einer tabelle ein diagramm mit beschrifteter X und Y-Achse zu plotten. Dafür kann der user dann ein interface benutzen wo man die datei auswählt etc... habe bis jetzt die zwei codes geschrieben, weiß aber nicht wie ich sie verknüpfen kann bzw wa sich machen soll. merci:)
English
hello to my dear matlabers
I am trying to select a certain sheed from an excel file in order to plot a diagram with labeled X and Y axis from a table. For this the user can then use an interface where you select the file etc... have so far written the two codes, but do not know how I can link them or wa should make. merci:)
1)
may=xlsread('Häckselplatz Illingen.xlsx','Temperatur','A2:E140995');
O=may(:,1)
U=may(:,2);
Z=may(:,3);
A=may(:,4);
t=1/8766:1/8766:size(O,1)/8766;
figure(1)
plot(t,O, t,U, t,Z, t,A);
title('Häckselplatz Illingen');
xlabel('Zeit [Monaten]');
ylabel('Temperatur [°C]');
legend('Öl-Temperatur','Umgebungstemperatur','Zuluft Trafostation','Abluft Trafostation')
2)
[file,path,indx] = uigetfile('*.xlsx','Select your Excel file','C:\');
if isequal(file,0)
disp('User selected Cancel')
else
disp(['User selected ', fullfile(path, file),...
' and filter index: ', num2str(indx)])
end
filename=append(path,file);
uiimport(filename);
Réponse acceptée
Plus de réponses (0)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!