Create an array containing indeces and value
显示 更早的评论
Hi everyone,
I have a problem that I don't know how to solve. How Can I create an array C from two matrix A (50X100)and B (50X100) where the matrix B contains the x coordinates of the value contained in Matrix A (meaning that to the value in the first row A correspond the coordinates in the first row B)?
Thank you so much
回答(2 个)
Would this be a simplified example fo what you mean?
[A,B]=ndgrid(1:5)
C=A.^2+B.^2
Matt J
2022-4-21
0 个投票
I need to the cross correlate the "combined" vectors with another vector. I don't know how to do it if they are separated.
xcorr2() or imfilter() should do that directly.
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!