Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

General Matlab question

Status
Not open for further replies.

pppbigppp

Electrical
May 17, 2006
1
Hi,

I'm curious if there is a way to save(export) a figure as a jpg file using only the commandline. In other word, I want to embedded the graph production in a m-script so that I don't have to click through several menus.

Also, I'm wondering if there is a way to access an array element of an output directly. Let say I have type

size(matrix)

and the return value is [1 2 3]. Is there a direct way to access the first element(1)? Currently, I have to assign the output to a, then call a(1). Would be nice to eliminate this temp variable.


Thanks!
 
Replies continue below

Recommended for you

you can use "saveas" command in matlab.

for example if you want to save an x-y plot,

h=plot(x,y);
saveas(h,'filename.jpg');

nodal..

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor