Saving my Plot as Jpg not working

11 次查看(过去 30 天)
I´m currently writing a program that´ll take data from an experiment and then save its plot. Sadly it doesnt wanna save it and I keep getting errors. The program is taking 2 columns of a CSV, plot them and should (even though it doesnt wanna work) save them. You guys will find the csv file as well as the program attached to this. Thanks for taking the time to read my Problem

回答(2 个)

Star Strider
Star Strider 2018-10-26
I’m not sure what you want to do. I don’t see any commands in you code to save anything.
If you want to save your plot or an image of it, use the saveas (link) function, or one of the other functions linked within or at the end of that page.

Image Analyst
Image Analyst 2018-10-26
What are the errors? You forgot to post them. Please attach all the red error text.
I ran it and it ran fine. I saved it from the toolbar icon into a PNG file:
I recommend you use export_fig http://blogs.mathworks.com/pick/2010/05/28/creating-and-exporting-publication-quality-graphics/ to save the axes or figure into a PNG file. No one likes JPG files anymore because of the bad compression artifacts it introduces.
I do praise you for writing pretty good code though. I like all the numerous comments in there and the use of descriptive variable names (not an impenetrable alphabet soup).

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by