How do I store the follwoing in 2d array
1 次查看(过去 30 天)
显示 更早的评论
In the code given below, I want to store cent as a 2D array, so that I can find the mean of X and Y co=ordinates. But,its getting stored as an 1D array.How can I store it as a 2d? Reshape does'nt work because the values are irregular, as in they are real-time inputs
part of the code: for object = 1:length(stats) bb = stats(object).BoundingBox; bc = stats(object).Centroid; rectangle('Position',bb,'EdgeColor','r','LineWidth',2) cent = [stats.Centroid]; ///////GETS STORED AS AN 1D plot(bc(1),bc(2), '-m+')
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Array Geometries and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!