matlab graph using excel data
Afficher commentaires plus anciens
hi,
i have an excel file (say file1.xlsx)numeric data with 2000 rows and 25 colums. and i have 20 such excel sheets in this file with the same number of rows and colums.
i want to create a matlab file which will create graph of sheet1 of this excel file and save it with all the settings(labels, legends, font, etc), so that next time i only select the sheet2 and it will auomatically create graph and so on for the next 20 sheets of the same excel file.
is there any tool in matlab for such plotting or i have to write piece of code.
if coding is the solution then please help me through this.
thank you in advance
Réponse acceptée
Plus de réponses (2)
Steven Lord
le 19 Nov 2019
0 votes
Import the first set of data and generate the figure as you want it to appear. Once you have set up one figure, generate code that you can use with the second, third, etc. data sets to create a new figure that looks roughly like the first. Depending on how your later data sets differ from your first you may need to adjust the appearance of the later figures to get them to look exactly how you want, but the generated code should start you off with something close to what you want.
Chintan
le 12 Jan 2025
0 votes
How to plot a graph in matlab using excel data?
1 commentaire
Walter Roberson
le 12 Jan 2025
Use readmatrix or readtable or readcell or xlsread to read in the data. If necessary, extract data from the resulting table or cell array.
You now have data in memory, which you can proceed to graph using your favourite graphing function. The graphing functions do not care where the data originated. There are no graphing functions that are specific to excel data, because once the data is read in it is just data.
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!