"Miroslav Balda" <miroslav.nospam@balda.cz> wrote in message <iiknp8$513$1@fred.mathworks.com>...
> Hi Ali,
> The code is wrong. You may not multiply matrices of different types. Your matrix 'r' is of the size [6,2] and the size of the vector N is [1,11]. It is the reason why MATLAB does not like it.
> More over, you used two nested cycles 'for'. It is also bad practice, because MATLAB is matrix oriented language. The follwing code shows, how to solve a slightly modified example:
>
> % Ali
> %%%%%% 20110205
> a=0;
> r=[55 59;23 0;74 89;2 10;83 72;103 106];
> [m,n] = size(r);
> N = (0:m1)'*90/(m1); % size N is [6,1]
> xy = repmat(r,1,2).*[cosd(repmat(N,1,n)), sind(repmat(N,1,n))] + a;
> plot(xy(:,1),xy(:,2),'ob', xy(:,3),xy(:,4),'*b')
> text(xy(:,1),xy(:,2),num2str(N,' %3.0f'))
> text(xy(:,3),xy(:,4),num2str(N,' %3.0f'))
>
> May be that it will help you.
> Best regards
>
> Mira
Hi Mira,
tanks for your reply, and sorry for misleading. My bad.
The problem is that, x and y define the location on a polar coordinate plot and their range has to be between 0 and 180. Also, N's length has to be 11 in the range between 0 and 90; because it's the classification range. I used "circle" formula, because i want to have each individual class (N=i) on different radius of this circle. The code which i have written execute this, though i have identification problem with positions, so i want to label the locations.
Respectfully,
Ali
(0180)
y N(0:90)
 /
 /
 /
 /
 /_____________x(0180)
