matlab division help needed
이전 댓글 표시
I need to perform the thinning algorithm and i am stuck in the division part
t = t - exp (u \sin (x));
i programmed this in matlab and i got an error the mldivision because the two sides are not of the same size ! i am aware both should be equal of the same size but in the algorithm i need to do this kind of division and i dont know how to get my way around it in matlab..
this is my code so far
i = 0; t = 0; u = rand (0,1); x = -pi:.1:pi; t = t - exp (u \sin (x));
while t < T u2 = rand (0,1); if u2 <= (sin(x) \ max(sin(x))) u2; end i = i+1;
end
채택된 답변
추가 답변 (2개)
Sisi Ma
2011년 3월 14일
1 개 추천
maybe you are looking for the "dot division" (in matlab a.\b). it performs element by element division of two maxtrix.
Walter Roberson
2011년 4월 10일
0 개 추천
I'm still uncertain that the \ operator was wanted rather than the / operator ??
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!