Search All of the Math Forum:

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

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

 Messages: [ Previous | Next ]
 ImageAnalyst Posts: 13,022 Registered: 12/26/06
Re: Correspondences of image coordinates
Posted: Jul 21, 2013 4:29 AM

Li
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;

Date Subject Author
7/21/13 ImageAnalyst
7/24/13 Li