Plot data from Excel
4 views (last 30 days)
Show older comments
How do I get Matlab to open my Excel file and read the data so that it is translated into a graph? It's projectile trajectory. The excel file has three columns (initial velocity, angle, and distance) and 20 rows.
So, how do I have matlab read the excel file and then plot it? A sample code would be great.
0 Comments
Answers (1)
Image Analyst
on 16 Dec 2013
Edited: Image Analyst
on 16 Dec 2013
First, make up your Excel file with some sample data and then make your plot and save it. Do that in Excel itself.
Then create your new data in MATLAB and write it with xlswrite() or ActiveX to the same cells (and same workbook of course) as when you created the file. The plot will update with the new values you wrote. If you want an example of ActiveX programming, see the attached.
0 Comments
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!