Pre-allocating geoshape array
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I am tring to concatenate a geoshape array in the follwoing manner:
finalShape = geoshape();
for k=1:nodeCount
%some code here...
m_shape = struct('Geometry', 'line','Longitude', str2double (x), 'Latitude', str2double (y));
m_shape_geo = geoshape(m_shape);
%some code here...(adds m_shape_geo adiditonal data)
finalShape = vertcat(finalShape, m_shape_geo);
end
This is very slow funciton, I belive due to missing preallocating.
- How do I pre allocate finalshape?
- Any other\better way to add geoshapes to array?
Thanks,
Yoni
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Language Fundamentals en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!