Isinterior function causes matlab to crash
Ältere Kommentare anzeigen
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 Kommentar
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.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Elementary Polygons finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!