Isinterior function causes matlab to crash
Afficher commentaires plus anciens
I am using the isinterior function in my matlba script. It produces the following error:
Requested 500X5500000 (22.0GB) array exceeds maximum array size preference (7.9GB). This might cause MATLAB to
become unresponsive.
Error in polyshape/isinterior>check_inpolygon (line 65)
x = x(ones(Nv,1),:);
Error in polyshape/isinterior (line 50)
[in, on] = check_inpolygon(X, Y, xv, yv, tol);
I have very simple code and I just need to check which points are in the inside of the shape. Why am I getting error.
How to fix?
Pleas help
1 commentaire
What is the size of the vertices in your polyshape and what are the sizes of the arrays of query point coordinates (the x and y inputs or the P input) in your call to isinterior?
For example, in this call:
P = nsidedpoly(8)
[in, on] = isinterior(P, rand(10, 1), rand(10, 1))
the polyshape object P has 8 vertices and the sizes of both x and y are [10 1]. I suspect your coordinates are not vectors of the same size but are vectors with different orientations that generate in and on outputs that are matrices rather than vectors.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Elementary Polygons dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!