Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
May 17, 2006
Messages
1
Location
CA
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!
 
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

Back
Top