i try to convert image into polar coordinates

4 views (last 30 days)
here a code :
r=imresize(a,[64 64]);
m =
n =
c = ((m+1)/2,(n+1)/2); %make center of the image to be the origin
Error: Expression or statement is incorrect--possibly unbalanced (, {, or [.
[theta,rho] = cart2pol(x-c,y-c);
how to fix this ? thanks
  1 Comment
Sophia on 17 Mar 2016
Edited: Sophia on 17 Mar 2016
change this c = ((m+1)/2,(n+1)/2)); and what is the error message after this

Sign in to comment.

Accepted Answer

Chad Greene
Chad Greene on 17 Mar 2016
Sophia is correct. The problem is on this line:
c = ((m+1)/2,(n+1)/2); %make center of the image to be the origin
Do you want c to be a two-element array? If yes, change the line to
c = [(m+1)/2,(n+1)/2]; %make center of the image to be the origin
Walter Roberson
Walter Roberson on 19 Mar 2016
Please show your code attempt complete with the texture mapping step, and please post the complete error message.

Sign in to comment.

More Answers (0)


Find more on Convert Image Type in Help Center and File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!