Alfred Zhong
Alfred Zhong

Reputation: 7081

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!

Upvotes: 0

Views: 1443

Answers (1)

Acorbe
Acorbe

Reputation: 8391

You can consider the command print, as

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

Here is the complete reference.

Upvotes: 2

Related Questions