matlab freemam chain codes problem.?
i want to perform freemam chain codes program, and i have done to trace the boundries of the images...then i want to Subsample onto a grid with spacing 50 pixels using command--
[s, su] = bsubsamp(b,50); but it keep teliing an error '??? Index exceeds matrix dimensions.
Error in ==> bsubsamp at 53
d1(Q:K, = cat(2, X(I), ord); '
what is the problem...and how to solve it..
lastly how come i can connect those subsample boundry...i have try function connectpoly but it doesnt work....i am using matlab r2008b...tq
Comments
Dear ron.,
Computers are stupid machines which do exactly what you instruct them to do. Since I don't have access to your Matlab source code and data, and you haven't given enough context to understand what line 53 of bsubsamp.m is supposed to do, I can only describe the process of solving your problem.
The error message is telling you that you are attempting to reference a nonexistent element of a matrix. In other words, some index used for referencing some element is outside of the bounds of an array's dimensions. For example, if M is a two-by-two matrix, then M(4, 72) in undefined and the indexes exceed the matrix dimensions. The usual way of finding what is happening is to display the matrix size and the values of the indexes just before the error is encountered. Typical ways of doing this are to either include such debugging output into your Matlab code, or to insert "keyboard" commands in appropriate places and obtain these things by interacting through the command window.
From what you have written, it looks like you would want to know the sizes of d1and X, and the values of Q, K, and I. Once you have found their values at the point where the error occurs, then you will need to ask yourself "Why?" and trace your way back through your code until you find the source of your error in logic. That is, you will need to find where you have told the computer to do something different than you actually intended.
As for your last question, without more information about what connectpoly is supposed to do with the inputs you give it, and what it is actually doing, I can't give a detailed answer. In any case, as before, this function is doing exactly what its author has instructed it to do. This means that either you are misunderstanding what it does, or you need to modify it so that it behaves in exactly the way you want.
an entire service can in easy words benefit this a lot. in spite of the undeniable fact that, you've replaced your chain and suddenly locate that it truly is jumping and slipping contained in the middle ring. this isn't a project with the chain. it truly is positioned on on the middle ring. it truly is going to value about £10 for a clean center ring, per chance £25 for one in aluminium. Having merely replaced the chain again, the project seems fastened. it would want to be that you probably did truly have a project with the chain. Who is regularly happening with. in spite of the undeniable fact that, many times jumping is indicative of positioned on and tear on the cogs, not the chain. it would want to in easy words be the cassette in case you've been jumping and slipping once you replaced the rear gears. in spite of the undeniable fact that, the project seems cured, yet when it reoccurs, seem on the middle cog on your chain set. success