The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Correspondences of image coordinates
Replies: 2   Last Post: Jul 24, 2013 10:39 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 13,022
Registered: 12/26/06
Re: Correspondences of image coordinates
Posted: Jul 21, 2013 4:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

First of all, don't have one hundred separately named variables - use an array. This is MATLAB after all, and the MAT stands for matrix so you should use matrices because that's what it was built for.

Then to subsample by 10, you can do

xx = x(1:10:end);

This will give you every tenth element. The elements will have the same values they used to have but there will be fewer of them: 10 instead of 100. If you want their values scaled down by a factor of 10, you can use xx = x(1:10:end)/10;

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.