简体   繁体   中英

octave saveas undefined

I have an octave code

M = csvread('result.csv');
h=hist(M);
saveas(h,'hist.jpg');

I got error message error: `saveas' undefined near line 11 column 1

I remember I did use saveas before. How come it is "undefined", my current octave version is

$ octave -version
GNU Octave, version 3.2.4 Copyright (C) 2009 John W. Eaton and others.

I just want to save a plot to an image file. Besides "saveas", do I have any other options?

Thanks a lot!

You can consider the command print , as

print(h,'name',['format']); 

Here is the complete reference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM