Is it the correct way to extract the value for the logical matrix?
1 次查看(过去 30 天)
显示 更早的评论
I got the following local matrix and now I want to extract the values for the logical 1, but when I do so, I'm getting an error which is
Array indices must be positive integers or logical values.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/713117/image.png)
[X,Y]= meshgrid(T2{:,5},T1{:,5});
A = X(idx);
B = Y(idx);
A = X(idx);
'Array indices must be positive integers or logical values
X and Y has the same size
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/713122/image.png)
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!