×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

translating an image

translating an image

translating an image

(OP)
after using imread to get a gif file, how do I tell matlab where on the screen to display it (rather than the default center). I am actually trying to show two different gif files side by side at the same time.
Sorry if this is trivial but I/m a relative novice and can't find a simple function to do it!

RE: translating an image

Hi,

1)get the screen size:
>> D=get(0,'screensize');
2) get the half screen dimensions:
x=D(3)/2;
y=D(4)/2;
3)create a figure in the lower left corner:
4)figure('position',[1 1 x-1 y-1])
load the image into a matrix and display it :
M1=imread('imagename.ext');
imagesc(M1)
5)repeat for the second image (at the upper right corner):
h2=figure('position',[x+1 y+1 x-1 y-1]);
M2=imread('imagenam2.ext');
imagesc(M2)
You can change image position by changing the figure position. For example:
set(h1,'position',[1 y-1 x-1 y-1])
 to bring the first image to the upper left corner.


Joe Sababa

BSTeX - Equation viewer for Matlab
http://www.geocities.com/bstex2001/

Joe
BSTeX- Equation viewer for Matlab
http://www.geocities.com/bstex2001

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources